mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
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:
parent
f257b08406
commit
953e58d004
@ -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…
Reference in New Issue
Block a user