[GH-ISSUE #382] Can not embed document #218

Closed
opened 2026-02-22 18:18:23 -05:00 by yindo · 1 comment
Owner

Originally created by @netandreus on GitHub (Nov 15, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/382

Problem

I got an error "Error: 1 documents could not be embedded". For testing purposes I used this document:

a_rose_for_emily.txt

Screenshot 2023-11-15 at 11 02 04

Possible source of problems

  • May be there is no connection to Weaviate. How can I check this?
  • May be it's needed to split all text file into chunks before send it to LLM for Embeddings? Now All file content send at one request.

Stack

  • LLM model: falcon-7b
  • LocalAI
  • Weaviate
  • Anything

Hardware

  • MacOS M2
  • OS: Ventura 13.5.2
  • Containerization: Docker Desktop 4.23.0 (120376)
  • Docker engine: 24.0.6
  • Docker compose: v2.21.0-desktop.1

My instalaltion

I connected LocalAI for LLM:

Screenshot 2023-11-15 at 11 03 26

and for Embeddings:

Screenshot 2023-11-15 at 11 03 36

After this I test that chat with LLM is working. Next I set local Weaviate as a vector database:

Screenshot 2023-11-15 at 11 08 53

Anything running as docker container with this config.

.env

SERVER_PORT=3001
CACHE_VECTORS="true"
VECTOR_DB="lancedb"
STORAGE_DIR="/app/server/storage"
UID='501'
GID='20'
LLM_PROVIDER='localai'
LOCAL_AI_BASE_PATH='http://localhost:8080/v1'
LOCAL_AI_MODEL_PREF='gpt-3.5-turbo-1106'
LOCAL_AI_MODEL_TOKEN_LIMIT=4096

Versions

  • Anything fresh master version with commit: 085745c…c5dc686
  • LocalIAI: v1.30.0
  • Weaviate: v1.21.8

Logs

anything

anything  | Failed to vectorize custom-documents/a-rose-for-emily-dfb1fd53-9716-43b2-9179-192fc4fd7779.json
anything  | [TELEMETRY SENT] {
anything  |   event: 'documents_embedded_in_workspace',
anything  |   distinctId: 'a9e35522-1f21-4ede-8302-1ea2e4db3c71',
anything  |   properties: { LLMSelection: 'localai', VectorDbSelection: 'weaviate' }
anything  | }
anything  | Weaviate::AllNamespace Error: usage error (401): {"code":401,"message":"oidc auth is not configured, please try another auth scheme or set up weaviate with OIDC configured"}
anything  |     at /app/server/node_modules/weaviate-ts-client/dist/index.js:1:9023
anything  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
anything  |     at async Object.allNamespaces (/app/server/utils/vectorDbProviders/weaviate/index.js:115:32)
anything  |     at async Object.totalVectors (/app/server/utils/vectorDbProviders/weaviate/index.js:36:29)
anything  |     at async /app/server/endpoints/system.js:180:27
anything  | Adding new vectorized document into namespace test_workspace
anything  | Chunks created from document: 28
anything  | Error: Could not embed document chunks! This document will not be recorded.
anything  |     at Object.addDocumentToNamespace (/app/server/utils/vectorDbProviders/weaviate/index.js:277:15)
anything  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
anything  |     at async Object.addDocuments (/app/server/models/documents.js:56:26)
anything  |     at async /app/server/endpoints/workspaces.js:128:33
anything  | addDocumentToNamespace Could not embed document chunks! This document will not be recorded.
anything  | Failed to vectorize custom-documents/a-rose-for-emily-dfb1fd53-9716-43b2-9179-192fc4fd7779.json
anything  | [TELEMETRY SENT] {
anything  |   event: 'documents_embedded_in_workspace',
anything  |   distinctId: 'a9e35522-1f21-4ede-8302-1ea2e4db3c71',
anything  |   properties: { LLMSelection: 'localai', VectorDbSelection: 'weaviate' }
anything  | }
anything  | Adding new vectorized document into namespace test_workspace
anything  | Chunks created from document: 28
anything  | Error: Could not embed document chunks! This document will not be recorded.
anything  |     at Object.addDocumentToNamespace (/app/server/utils/vectorDbProviders/weaviate/index.js:277:15)
anything  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
anything  |     at async Object.addDocuments (/app/server/models/documents.js:56:26)
anything  |     at async /app/server/endpoints/workspaces.js:128:33
anything  | addDocumentToNamespace Could not embed document chunks! This document will not be recorded.
anything  | Failed to vectorize custom-documents/a-rose-for-emily-dfb1fd53-9716-43b2-9179-192fc4fd7779.json
anything  | [TELEMETRY SENT] {
anything  |   event: 'documents_embedded_in_workspace',
anything  |   distinctId: 'a9e35522-1f21-4ede-8302-1ea2e4db3c71',
anything  |   properties: { LLMSelection: 'localai', VectorDbSelection: 'weaviate' }
anything  | }

localAi

11:04AM DBG Request received:
11:04AM DBG Parameter Config: &{PredictionOptions:{Model:falcon-7b-instruct-q4_0.gguf Language: N:0 TopP:0.65 TopK:40 Temperature:0.9 Maxtokens:0 Echo:false Batch:0 F16:false IgnoreEOS:false RepeatPenalty:0 Keep:0 MirostatETA:0 MirostatTAU:0 Mirostat:0 FrequencyPenalty:0 TFZ:0 TypicalP:0 Seed:0 NegativePrompt: RopeFreqBase:0 RopeFreqScale:0 NegativePromptScale:0 UseFastTokenizer:false ClipSkip:0 Tokenizer:} Name:gpt-3.5-turbo-1106 F16:true Threads:4 Debug:true Roles:map[] Embeddings:true Backend: TemplateConfig:{Chat: ChatMessage: Completion: Edit: Functions:} PromptStrings:[] InputStrings:[A Rose for Emily
(The Forum, 1930) WHEN Miss Emily Grierson died, our whole town went to her funeral: the men
...
(here is ALL content from txt file, without separated to chunks)
...
acrid in the nostrils, we saw a long strand of iron-gray hair.] InputToken:[] functionCallString: functionCallNameString: FunctionsConfig:{DisableNoAction:false NoActionFunctionName: NoActionDescriptionName:} FeatureFlag:map[] LLMConfig:{SystemPrompt: TensorSplit: MainGPU: RMSNormEps:0 NGQA:0 PromptCachePath: PromptCacheAll:false PromptCacheRO:false MirostatETA:0 MirostatTAU:0 Mirostat:0 NGPULayers:1 MMap:false MMlock:false LowVRAM:false Grammar: StopWords:[] Cutstrings:[] TrimSpace:[] ContextSize:2000 NUMA:false LoraAdapter: LoraBase: NoMulMatQ:false DraftModel: NDraft:0 Quantization:} AutoGPTQ:{ModelBaseName: Device: Triton:false UseFastTokenizer:false} Diffusers:{PipelineType: SchedulerType: CUDA:false EnableParameters: CFGScale:0 IMG2IMG:false ClipSkip:0 ClipModel: ClipSubFolder:} Step:0 GRPC:{Attempts:0 AttemptsSleepTime:0} VallE:{AudioPath:}}
11:04AM DBG Model already loaded in memory: falcon-7b-instruct-q4_0.gguf
11:04AM DBG Model 'falcon-7b-instruct-q4_0.gguf' already loaded
[127.0.0.1]:64098 500 - POST /v1/embeddings
Originally created by @netandreus on GitHub (Nov 15, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/382 ### Problem I got an error "Error: 1 documents could not be embedded". For testing purposes I used this document: [a_rose_for_emily.txt](https://github.com/Mintplex-Labs/anything-llm/files/13361389/a_rose_for_emily.txt) <img width="1612" alt="Screenshot 2023-11-15 at 11 02 04" src="https://github.com/Mintplex-Labs/anything-llm/assets/313477/81b66a7e-8592-4613-9880-e31a7067d75e"> ### Possible source of problems - May be there is no connection to Weaviate. How can I check this? - May be it's needed to split all text file into chunks before send it to LLM for Embeddings? Now All file content send at one request. ### Stack - LLM model: [falcon-7b](https://huggingface.co/hadongz/falcon-7b-instruct-gguf/resolve/main/falcon-7b-instruct-q4_0.gguf) - LocalAI - Weaviate - Anything ### Hardware - MacOS M2 - OS: Ventura 13.5.2 - Containerization: Docker Desktop 4.23.0 (120376) - Docker engine: 24.0.6 - Docker compose: v2.21.0-desktop.1 ### My instalaltion I connected LocalAI for LLM: <img width="1659" alt="Screenshot 2023-11-15 at 11 03 26" src="https://github.com/Mintplex-Labs/anything-llm/assets/313477/a2013620-a6f7-4bdf-b8d4-4733d8c64105"> and for Embeddings: <img width="1659" alt="Screenshot 2023-11-15 at 11 03 36" src="https://github.com/Mintplex-Labs/anything-llm/assets/313477/29d90fcb-a2c7-4cf2-ae74-dacacb09d618"> After this I test that chat with LLM is working. Next I set local Weaviate as a vector database: <img width="1659" alt="Screenshot 2023-11-15 at 11 08 53" src="https://github.com/Mintplex-Labs/anything-llm/assets/313477/3c7fdc97-9b19-4aef-8753-cc0ccf11bbc4"> Anything running as docker container with this config. **.env** ``` SERVER_PORT=3001 CACHE_VECTORS="true" VECTOR_DB="lancedb" STORAGE_DIR="/app/server/storage" UID='501' GID='20' LLM_PROVIDER='localai' LOCAL_AI_BASE_PATH='http://localhost:8080/v1' LOCAL_AI_MODEL_PREF='gpt-3.5-turbo-1106' LOCAL_AI_MODEL_TOKEN_LIMIT=4096 ``` ### Versions - Anything fresh master version with commit: 085745c…c5dc686 - LocalIAI: v1.30.0 - Weaviate: v1.21.8 ### Logs **anything** ``` anything | Failed to vectorize custom-documents/a-rose-for-emily-dfb1fd53-9716-43b2-9179-192fc4fd7779.json anything | [TELEMETRY SENT] { anything | event: 'documents_embedded_in_workspace', anything | distinctId: 'a9e35522-1f21-4ede-8302-1ea2e4db3c71', anything | properties: { LLMSelection: 'localai', VectorDbSelection: 'weaviate' } anything | } anything | Weaviate::AllNamespace Error: usage error (401): {"code":401,"message":"oidc auth is not configured, please try another auth scheme or set up weaviate with OIDC configured"} anything | at /app/server/node_modules/weaviate-ts-client/dist/index.js:1:9023 anything | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) anything | at async Object.allNamespaces (/app/server/utils/vectorDbProviders/weaviate/index.js:115:32) anything | at async Object.totalVectors (/app/server/utils/vectorDbProviders/weaviate/index.js:36:29) anything | at async /app/server/endpoints/system.js:180:27 anything | Adding new vectorized document into namespace test_workspace anything | Chunks created from document: 28 anything | Error: Could not embed document chunks! This document will not be recorded. anything | at Object.addDocumentToNamespace (/app/server/utils/vectorDbProviders/weaviate/index.js:277:15) anything | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) anything | at async Object.addDocuments (/app/server/models/documents.js:56:26) anything | at async /app/server/endpoints/workspaces.js:128:33 anything | addDocumentToNamespace Could not embed document chunks! This document will not be recorded. anything | Failed to vectorize custom-documents/a-rose-for-emily-dfb1fd53-9716-43b2-9179-192fc4fd7779.json anything | [TELEMETRY SENT] { anything | event: 'documents_embedded_in_workspace', anything | distinctId: 'a9e35522-1f21-4ede-8302-1ea2e4db3c71', anything | properties: { LLMSelection: 'localai', VectorDbSelection: 'weaviate' } anything | } anything | Adding new vectorized document into namespace test_workspace anything | Chunks created from document: 28 anything | Error: Could not embed document chunks! This document will not be recorded. anything | at Object.addDocumentToNamespace (/app/server/utils/vectorDbProviders/weaviate/index.js:277:15) anything | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) anything | at async Object.addDocuments (/app/server/models/documents.js:56:26) anything | at async /app/server/endpoints/workspaces.js:128:33 anything | addDocumentToNamespace Could not embed document chunks! This document will not be recorded. anything | Failed to vectorize custom-documents/a-rose-for-emily-dfb1fd53-9716-43b2-9179-192fc4fd7779.json anything | [TELEMETRY SENT] { anything | event: 'documents_embedded_in_workspace', anything | distinctId: 'a9e35522-1f21-4ede-8302-1ea2e4db3c71', anything | properties: { LLMSelection: 'localai', VectorDbSelection: 'weaviate' } anything | } ``` **localAi** ``` 11:04AM DBG Request received: 11:04AM DBG Parameter Config: &{PredictionOptions:{Model:falcon-7b-instruct-q4_0.gguf Language: N:0 TopP:0.65 TopK:40 Temperature:0.9 Maxtokens:0 Echo:false Batch:0 F16:false IgnoreEOS:false RepeatPenalty:0 Keep:0 MirostatETA:0 MirostatTAU:0 Mirostat:0 FrequencyPenalty:0 TFZ:0 TypicalP:0 Seed:0 NegativePrompt: RopeFreqBase:0 RopeFreqScale:0 NegativePromptScale:0 UseFastTokenizer:false ClipSkip:0 Tokenizer:} Name:gpt-3.5-turbo-1106 F16:true Threads:4 Debug:true Roles:map[] Embeddings:true Backend: TemplateConfig:{Chat: ChatMessage: Completion: Edit: Functions:} PromptStrings:[] InputStrings:[A Rose for Emily (The Forum, 1930) WHEN Miss Emily Grierson died, our whole town went to her funeral: the men ... (here is ALL content from txt file, without separated to chunks) ... acrid in the nostrils, we saw a long strand of iron-gray hair.] InputToken:[] functionCallString: functionCallNameString: FunctionsConfig:{DisableNoAction:false NoActionFunctionName: NoActionDescriptionName:} FeatureFlag:map[] LLMConfig:{SystemPrompt: TensorSplit: MainGPU: RMSNormEps:0 NGQA:0 PromptCachePath: PromptCacheAll:false PromptCacheRO:false MirostatETA:0 MirostatTAU:0 Mirostat:0 NGPULayers:1 MMap:false MMlock:false LowVRAM:false Grammar: StopWords:[] Cutstrings:[] TrimSpace:[] ContextSize:2000 NUMA:false LoraAdapter: LoraBase: NoMulMatQ:false DraftModel: NDraft:0 Quantization:} AutoGPTQ:{ModelBaseName: Device: Triton:false UseFastTokenizer:false} Diffusers:{PipelineType: SchedulerType: CUDA:false EnableParameters: CFGScale:0 IMG2IMG:false ClipSkip:0 ClipModel: ClipSubFolder:} Step:0 GRPC:{Attempts:0 AttemptsSleepTime:0} VallE:{AudioPath:}} 11:04AM DBG Model already loaded in memory: falcon-7b-instruct-q4_0.gguf 11:04AM DBG Model 'falcon-7b-instruct-q4_0.gguf' already loaded [127.0.0.1]:64098 500 - POST /v1/embeddings ```
yindo closed this issue 2026-02-22 18:18:23 -05:00
Author
Owner

@timothycarambat commented on GitHub (Nov 16, 2023):

You are using some form of OIDC auth for Weaviate so AnythingLLM cannot connect to your weaviate instance running locally. Turn off auth for the weaviate docker image totally if you wont be using an API key.

anything | Weaviate::AllNamespace Error: usage error (401): {"code":401,"message":"oidc auth is not configured, please try another auth scheme or set up weaviate with OIDC configured"}

@timothycarambat commented on GitHub (Nov 16, 2023): You are using some form of OIDC auth for Weaviate so AnythingLLM cannot connect to your weaviate instance running locally. Turn off auth for the weaviate docker image totally if you wont be using an API key. > anything | Weaviate::AllNamespace Error: usage error (401): {"code":401,"message":"**oidc auth is not configured, please try another auth scheme or set up weaviate with OIDC configured**"}
yindo changed title from Can not embed document to [GH-ISSUE #382] Can not embed document 2026-06-05 14:34:07 -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#218