From 73ad7f2e7afd28b62c3416d0bf10e20a2d26e41a Mon Sep 17 00:00:00 2001 From: RIdham Golakiya <109126257+RidhamGolakiya@users.noreply.github.com> Date: Wed, 9 Oct 2024 01:51:58 +0530 Subject: [PATCH] langchain_chroma[patch]: updated example for get documents with where clause (#26767) Example updated for vectorstore ChromaDB. If we want to apply multiple filters then ChromaDB supports filters like this: Reference: [ChromaDB filters](https://cookbook.chromadb.dev/core/filters/) Thank you. --- libs/partners/chroma/langchain_chroma/vectorstores.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/partners/chroma/langchain_chroma/vectorstores.py b/libs/partners/chroma/langchain_chroma/vectorstores.py index 90c59ef2beb..945057f4adb 100644 --- a/libs/partners/chroma/langchain_chroma/vectorstores.py +++ b/libs/partners/chroma/langchain_chroma/vectorstores.py @@ -941,7 +941,7 @@ class Chroma(VectorStore): Args: ids: The ids of the embeddings to get. Optional. where: A Where type dict used to filter results by. - E.g. `{"color" : "red", "price": 4.20}`. Optional. + E.g. `{"$and": [{"color": "red"}, {"price": 4.20}]}` Optional. limit: The number of documents to return. Optional. offset: The offset to start returning results from. Useful for paging results with limit. Optional.