FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.16k stars 16.23k forks source link

[BUG] cannot retrieve data from local chroma database #3453

Open mxsteini opened 21 hours ago

mxsteini commented 21 hours ago

When I try to retrieve data from my chromaDB the chat returns:

Bad request to
http://chroma:8000/api/v1/collections/a21f79b6-b3f1-4b4c-a277-1cca3127983e/query
with status: Bad Request

The flowise logs says:

[chain/error] [1:chain:RunnableSequence] [542ms] Chain run errored with error: "Bad request to http://chroma:8000/api/v1/collections/a21f79b6-b3f1-4b4c-a277-1cca3127983e/query with status: Bad Request\n\nChromaClientError: Bad request to http://chroma:8000/api/v1/collections/a21f79b6-b3f1-4b4c-a277-1cca3127983e/query with status: Bad Request\n    at chromaFetch (/usr/local/lib/node_modules/flowise/node_modules/chromadb/dist/cjs/chromadb.cjs:2647:17)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Collection.query (/usr/local/lib/node_modules/flowise/node_modules/chromadb/dist/cjs/chromadb.cjs:2338:12)\n    at async ChromaExtended.similaritySearchVectorWithScore (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/dist/vectorstores/chroma.cjs:347:24)\n    at async ChromaExtended.similaritySearch (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/vectorstores.cjs:108:25)\n    at async VectorStoreRetriever.getRelevantDocuments (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/retrievers/index.cjs:72:29)\n    at async VectorStoreRetriever._streamIterator (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/runnables/base.cjs:165:9)\n    at async VectorStoreRetriever.transform (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/runnables/base.cjs:402:9)\n    at async RunnableSequence._streamIterator (/usr/local/lib/node_modules/flowise/node_modules/@langchain/core/dist/runnables/base.cjs:1208:30)"
2024-11-04 17:54:47 [ERROR]: [server]: Error: Bad request to http://chroma:8000/api/v1/collections/a21f79b6-b3f1-4b4c-a277-1cca3127983e/query with status: Bad Request
ChromaClientError: Bad request to http://chroma:8000/api/v1/collections/a21f79b6-b3f1-4b4c-a277-1cca3127983e/query with status: Bad Request
    at chromaFetch (/usr/local/lib/node_modules/flowise/node_modules/chromadb/dist/cjs/chromadb.cjs:2647:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Collection.query (/usr/local/lib/node_modules/flowise/node_modules/chromadb/dist/cjs/chromadb.cjs:2338:12)
    at async ChromaExtended.similaritySearchVectorWithScore (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/dist/vectorstores/chroma.cjs:347:24)
    at async ChromaExtended.similaritySearch (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/vectorstores.cjs:108:25)
    at async VectorStoreRetriever.getRelevantDocuments (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/retrievers/index.cjs:72:29)
    at async VectorStoreRetriever._streamIterator (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/runnables/base.cjs:165:9)
    at async VectorStoreRetriever.transform (/usr/local/lib/node_modules/flowise/node_modules/@langchain/community/node_modules/@langchain/core/dist/runnables/base.cjs:402:9)
    at async RunnableSequence._streamIterator (/usr/local/lib/node_modules/flowise/node_modules/@langchain/core/dist/runnables/base.cjs:1208:30)

I'm running flowise in a docker compose environment. All included in on cluster

Upserting Data is no problem. I checked the database by vector-admin - the data looks well.

I'm upserting to http://chroma:8000 I also tried the internal docker IP, which worked.

Only retrieving produces this error.

I'm pretty stumped now. I've been poking around in my setup for a few hours now and have no more ideas.

HenryHengZJ commented 21 hours ago

Have you tried this guide? https://docs.flowiseai.com/integrations/langchain/vector-stores/chroma#additional

mxsteini commented 20 hours ago

Yes sire, but I didn't got the point. switching to external doesn't make sense because everything is inside and the proposed conncection is a internal conncection as I understand. And runnng a similar configuration on my desktop worked. Now I'm trying to deploy the whole configuration.

Please corrrect me: I suspect, that the retrieving goes a similar way as the upserting. Which means on the server, inside my docker compose network.

So, if upserting works - why doesn't retrieving?

mxsteini commented 5 hours ago

So, this is really ... 2 days live time. The error belongs to chroma DB. The last working version is: chromadb/chroma:0.5.16. (I didn't played with dev-versions)

As I interprete all things right, we have a chromadb client with version 1.5.11. The latest version ist is 1.9.2.

packages/components/package.json

So it could be a good idea to update this before spendings more time on this.