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
What I'm looking at in vectordb, it actually has some databases that support this filters feature:phi/vectordb/pgvector/pgvector2.py
But in fact, there is no relevant implementation in the assistant, such as the following code:
def get_references_from_knowledge_base(self, query: str, num_documents: Optional[int] = None) -> Optional[str]:
"""Return a list of references from the knowledge base"""
if self.references_function is not None:
reference_kwargs = {"assistant": self, "query": query, "num_documents": num_documents}
return remove_indent(self.references_function(**reference_kwargs))
if self.knowledge_base is None:
return None
relevant_docs: List[Document] = self.knowledge_base.search(query=query, num_documents=num_documents)
if len(relevant_docs) == 0:
return None
if self.references_format == "yaml":
import yaml
return yaml.dump([doc.to_dict() for doc in relevant_docs])
return json.dumps([doc.to_dict() for doc in relevant_docs], indent=2)
I think a feature for this could be added
The text was updated successfully, but these errors were encountered:
What I'm looking at in vectordb, it actually has some databases that support this filters feature:
phi/vectordb/pgvector/pgvector2.py
But in fact, there is no relevant implementation in the assistant, such as the following code:
I think a feature for this could be added
The text was updated successfully, but these errors were encountered: