Skip to content

The agent engineering platform.

similarity_search is not accepting filters (#1964)

Rajat Saxena953e58d00407
diff --git a/langchain/vectorstores/chroma.py b/langchain/vectorstores/chroma.py
index 2a0db5898f..f9048eec03 100644
--- a/langchain/vectorstores/chroma.py
+++ b/langchain/vectorstores/chroma.py
@@ -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(