-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with ChromaDB Integration in LangChain #7283
Comments
Hey @stevearagonsite! I'm here to help you with any bugs, questions, or contributions you have. Let's work on getting this sorted out together! The issue you're encountering with the "bad request" error when using an empty To resolve this, you should ensure that your queries do not include an empty Here's a potential adjustment to your code: public async search(
index: string,
query: string = '',
layer: string,
K: number = 5,
options: any = {}
) {
const store = await this.getStore(index, layer);
const hasValidWhereClause = options && Object.keys(options).length > 0;
return await store.similaritySearch(query, K, hasValidWhereClause ? options : null);
} This change checks if the |
The error is in the |
I am experiencing the same issue with chromadb image 0.5.20 and langchain integration.
|
same there.
|
I solved this issue by creating a virtual environment and installing all my dependencies (chromadb, langchain, etc) from a requirements.txt file. Pretty sure I had an incompatible version of langchain. |
I had the same issue and solved it by upgrading to |
Checked other resources
Example Code
I am encountering issues when using ChromaDB through LangChain integration, particularly with the new image version chromadb/chroma:0.5.20. Specifically, there seems to be a problem with queries containing an empty
where: {}
clause, which results in a "bad request" error.Problem
Below are examples of successful and failing queries to illustrate the issue:
Query with a specific where clause, has been executing correctly:
Query with error
Last query result in errors, making it impossible to proceed with the intended functionality.
Code Example
Below is a snippet of the Typescript code being used:
Error Message and Stack Trace (if applicable)
Description
System Info
Macbook silicon M1
Node: 20.14.0
pnpm: 9.14.2
The text was updated successfully, but these errors were encountered: