mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-01 00:49:25 +00:00
Fix Chroma integration failing when there are less than 4 items in the collection (#3674)
The code was failing to decrement the `n_results` kwarg passed to `query(...)`
This commit is contained in:
parent
57e028549a
commit
0a7a2b99b5
@ -111,7 +111,7 @@ class Chroma(VectorStore):
|
||||
return self._collection.query(
|
||||
query_texts=query_texts,
|
||||
query_embeddings=query_embeddings,
|
||||
n_results=n_results,
|
||||
n_results=i,
|
||||
where=where,
|
||||
)
|
||||
except chromadb.errors.NotEnoughElementsException:
|
||||
|
Loading…
Reference in New Issue
Block a user