[GH-ISSUE #2927] Embed txt file into Chroma via AnythingLLM failed #1864

Closed
opened 2026-02-22 18:26:53 -05:00 by yindo · 4 comments
Owner

Originally created by @seanchenxiao on GitHub (Jan 1, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2927

Hi There,

Can anyone help me with the issue I encountered?

  1. This is my first time to use Chroma via AnythingLLM, and I'm trying to put some text documents into Chroma via AnythingLLM
  2. Both Chroma and AnythingLLA are running in Docker containers,
  3. Embedder I selected is the default AnythingLLM's native embedding engine

But when I tried to click Save and Embed button in Documents, a small message popped up showing:

**Error: Documents failed to add

fetch failed**

And I found more information from AnythingLLM logs as the below,

2025-01-01 22:32:50 [backend] error: addDocumentToNamespace fetch failed
2025-01-01 22:32:50 [backend] error: Failed to vectorize Doc1.txt

Thanks,
Sean

Originally created by @seanchenxiao on GitHub (Jan 1, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2927 Hi There, Can anyone help me with the issue I encountered? 1. This is my first time to use Chroma via AnythingLLM, and I'm trying to put some text documents into Chroma via AnythingLLM 2. Both Chroma and AnythingLLA are running in Docker containers, 3. Embedder I selected is the default AnythingLLM's native embedding engine But when I tried to click Save and Embed button in Documents, a small message popped up showing: **Error: Documents failed to add fetch failed** And I found more information from AnythingLLM logs as the below, **2025-01-01 22:32:50 [backend] error: addDocumentToNamespace fetch failed 2025-01-01 22:32:50 [backend] error: Failed to vectorize Doc1.txt** Thanks, Sean
yindo closed this issue 2026-02-22 18:26:53 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 2, 2025):

Possibly related: https://github.com/Mintplex-Labs/anything-llm/issues/2536

Do you see any logs on Chroma's side? Does it look like an upsert occurs or a namespace is created? Its much more likely you are trying to connect AnythingLLM to Chroma using http://localhost:8000 and for the AnythingLLM container to reach out to the host network you need to be using host.docker.internal

https://github.com/Mintplex-Labs/anything-llm/blob/b39f60abfbeb2a93da712de51fe879f2433010a9/docker/HOW_TO_USE_DOCKER.md?plain=1#L22-L32

Let me know if that is or is not the case

@timothycarambat commented on GitHub (Jan 2, 2025): Possibly related: https://github.com/Mintplex-Labs/anything-llm/issues/2536 Do you see any logs on Chroma's side? Does it look like an upsert occurs or a namespace is created? Its much more likely you are trying to connect AnythingLLM to Chroma using `http://localhost:8000` and for the AnythingLLM container to reach out to the host network you need to be using `host.docker.internal` https://github.com/Mintplex-Labs/anything-llm/blob/b39f60abfbeb2a93da712de51fe879f2433010a9/docker/HOW_TO_USE_DOCKER.md?plain=1#L22-L32 Let me know if that is or is not the case
Author
Owner

@seanchenxiao commented on GitHub (Jan 2, 2025):

Thanks Tim for your response, in fact I'm just following your YouTube video (How to run a private Chroma Vector Database locally in 5 mins!) and doing this hands-on practice :), so it's so nice to see your response and help me.

I couldn't find relevant Chroma logs generated for this document embedding yet. I think this issue prevented the embedding request from reaching Chroma yet, so Chroma hasn't responded. But by replacing http://localhost:xxxx to http://host.docker.internal:xxxx, the issue got resolved, and I could see the document embedded. Thanks.

The next step in your video is to see what is embedded at Chroma side via http://localhost:8000/api/v1/collections after the document was embedded via AnythingLLM, and I could see the below as well. Maybe my understanding is not right, because I did a testing by adding and removing that embedded document from Chroma via AnythingLLM Documents, and however the below data weren't changed, I thought once the embedded document was removed from Chroma, and I accessed http://localhost:8000/api/v1/collections, something different maybe "No Data Found" should return on the browser? Can you help to clarify further? Thanks a lot.

[
{
"id": "1526c925-673f-4c04-a66e-f7500d4384bc",
"name": "chromadb",
"configuration_json": {
"hnsw_configuration": {
"space": "l2",
"ef_construction": 100,
"ef_search": 10,
"num_threads": 16,
"M": 16,
"resize_factor": 1.2,
"batch_size": 100,
"sync_threshold": 1000,
"_type": "HNSWConfigurationInternal"
},
"_type": "CollectionConfigurationInternal"
},
"metadata": {
"hnsw:space": "cosine"
},
"dimension": 384,
"tenant": "default_tenant",
"database": "default_database",
"version": 0,
"log_position": 0
}
]

@seanchenxiao commented on GitHub (Jan 2, 2025): Thanks Tim for your response, in fact I'm just following your YouTube video (**_How to run a private Chroma Vector Database locally in 5 mins!_**) and doing this hands-on practice :), so it's so nice to see your response and help me. I couldn't find relevant Chroma logs generated for this document embedding yet. I think this issue prevented the embedding request from reaching Chroma yet, so Chroma hasn't responded. But by replacing http://localhost:xxxx to http://host.docker.internal:xxxx, the issue got resolved, and I could see the document embedded. Thanks. The next step in your video is to see what is embedded at Chroma side via http://localhost:8000/api/v1/collections after the document was embedded via AnythingLLM, and I could see the below as well. Maybe my understanding is not right, because I did a testing by adding and removing that embedded document from Chroma via AnythingLLM Documents, and however the below data weren't changed, I thought once the embedded document was removed from Chroma, and I accessed http://localhost:8000/api/v1/collections, something different maybe "No Data Found" should return on the browser? Can you help to clarify further? Thanks a lot. [ { "id": "1526c925-673f-4c04-a66e-f7500d4384bc", "name": "chromadb", "configuration_json": { "hnsw_configuration": { "space": "l2", "ef_construction": 100, "ef_search": 10, "num_threads": 16, "M": 16, "resize_factor": 1.2, "batch_size": 100, "sync_threshold": 1000, "_type": "HNSWConfigurationInternal" }, "_type": "CollectionConfigurationInternal" }, "metadata": { "hnsw:space": "cosine" }, "dimension": 384, "tenant": "default_tenant", "database": "default_database", "version": 0, "log_position": 0 } ]
Author
Owner

@timothycarambat commented on GitHub (Jan 2, 2025):

@seanchenxiao That result is the from the namespace, we dont remove namespaces once they are empty since they could be reused again. So it makes sense the namespace would still exist even with no documents in it as well as the dimensions stay the same since that is a write-once property of the namespace.

In AnythingLLM, if you go to the workspaces settings > Vector Database > Reset vectordatabase - this should delete the namespace totally from Chroma.

If you wanted to see the embeddings in a namespace there is a collection/query endpoint in chroma IIRC. You can go to http://localhost:8000/api/docs or http://localhost:8000/docs to see all the endpoints in a browser.

@timothycarambat commented on GitHub (Jan 2, 2025): @seanchenxiao That result is the from the namespace, we dont remove namespaces once they are empty since they could be reused again. So it makes sense the namespace would still exist even with no documents in it as well as the dimensions stay the same since that is a write-once property of the namespace. In AnythingLLM, if you go to the workspaces settings > Vector Database > Reset vectordatabase - this should delete the namespace totally from Chroma. If you wanted to see the _embeddings_ in a namespace there is a `collection/query` endpoint in chroma IIRC. You can go to http://localhost:8000/api/docs or http://localhost:8000/docs to see all the endpoints in a browser.
Author
Owner

@seanchenxiao commented on GitHub (Jan 3, 2025):

Thanks a lots Tim.

@seanchenxiao commented on GitHub (Jan 3, 2025): Thanks a lots Tim.
yindo changed title from Embed txt file into Chroma via AnythingLLM failed to [GH-ISSUE #2927] Embed txt file into Chroma via AnythingLLM failed 2026-06-05 14:43:09 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1864