similarity_search is not accepting filters (#1964)

I have changed the name of the argument from `where` to `filter` which
is expected by `similarity_search_with_score`.

Fixes #1838

---------

Co-authored-by: Rajat Saxena <hi@rajatsaxena.dev>
searx
Rajat Saxena 1 year ago committed by GitHub
parent f257b08406
commit 953e58d004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -128,9 +128,9 @@ class Chroma(VectorStore):
filter (Optional[Dict[str, str]]): Filter by metadata. Defaults to None.
Returns:
List[Document]: List of documents most simmilar to the query text.
List[Document]: List of documents most similar to the query text.
"""
docs_and_scores = self.similarity_search_with_score(query, k, where=filter)
docs_and_scores = self.similarity_search_with_score(query, k, filter=filter)
return [doc for doc, _ in docs_and_scores]
def similarity_search_by_vector(

Loading…
Cancel
Save