feat: where filter in vector database (#518)

This commit is contained in:
sw8fbar
2023-09-04 15:49:59 -05:00
committed by GitHub
parent 202fd2d5b6
commit 3e66ddf69a
6 changed files with 156 additions and 14 deletions

View File

@@ -38,6 +38,7 @@ class ChatConfig(QueryConfig):
stream: bool = False,
deployment_name=None,
system_prompt: Optional[str] = None,
where=None,
):
"""
Initializes the ChatConfig instance.
@@ -57,6 +58,7 @@ class ChatConfig(QueryConfig):
:param stream: Optional. Control if response is streamed back to the user
:param deployment_name: t.b.a.
:param system_prompt: Optional. System prompt string.
:param where: Optional. A dictionary of key-value pairs to filter the database results.
:raises ValueError: If the template is not valid as template should contain
$context and $query and $history
"""
@@ -77,6 +79,7 @@ class ChatConfig(QueryConfig):
stream=stream,
deployment_name=deployment_name,
system_prompt=system_prompt,
where=where,
)
def set_history(self, history):