GPTCache
1# pylint: disable=unused-argument
2def check_hit_session(cur_session_id: str, cache_session_ids: list, cache_questions: list, cache_answer: str):
3"""
4Check if the sesion result meets the hit requirement.
5
6:param cur_session_id: the name of the current session.
7:type cur_session_id: str
8:param cache_session_ids: a list of session names for caching the same content if you are using map as a data management method.
9Otherwise a list of session names for similar content and same answer.
10:type cache_session_ids: list
11:param cache_question: a list with one question which same as the you asked if you use a map as a data management method.
12Otherwise it is a list that is similar to the question you asked with the same answer,
13and it is correspondence with cache_session_ids.
14:type cache_question: list
15:param cache_answer: the content of the cached answer.
16:param cache_answer: str
17
18:return: True or False
19"""
20return cur_session_id not in cache_session_ids
21