You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vectorq/main.py
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -43,14 +43,11 @@ def infer_with_cache_info(
43
43
Infer a response from the cache and return the cache hit status, the response, and the nearest neighbor response.
44
44
Args
45
45
prompt: str - The prompt to create a response for.
46
-
system_prompt: Optional[str] - The optional system prompt to use for the response. It will override the system prompt in the VectorQConfig if provided.
46
+
system_prompt: Optional[str] - The optional system prompt to use for the response. It will override the system prompt set in the InferenceEngine if provided.
47
47
inference_engine_kwargs: Any - Additional arguments to pass to the underlying inference engine (e.g., max_tokens, temperature, etc).
48
48
Returns
49
49
Tuple[bool, str, str] - [is_cache_hit, response, nn_response] (the response is the one supposed to be used by the user, the nn_response is for benchmarking purposes)
50
50
"""
51
-
ifsystem_promptisNone:
52
-
system_prompt=self.vectorq_config.system_prompt
53
-
54
51
returnself.vectorq_policy.process_request(
55
52
prompt=prompt,
56
53
system_prompt=system_prompt,
@@ -67,7 +64,7 @@ def infer(
67
64
Infer a response from the cache and return the response.
68
65
Args
69
66
prompt: str - The prompt to create a response for.
70
-
system_prompt: Optional[str] - The optional system prompt to use for the response. It will override the system prompt in the VectorQConfig if provided.
67
+
system_prompt: Optional[str] - The optional system prompt to use for the response. It will override the system prompt in the InferenceEngine if provided.
71
68
inference_engine_kwargs: Any - Additional arguments to pass to the underlying inference engine (e.g., max_tokens, temperature, etc).
0 commit comments