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>
This commit is contained in:
Rajat Saxena 2023-03-28 03:34:53 +05:30 committed by GitHub
parent f257b08406
commit 953e58d004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(