-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
investigatingCore team or maintainer will or is currently looking into this issueCore team or maintainer will or is currently looking into this issueneeds info / can't replicateIssues that require additional information and/or cannot currently be replicated, but possible bugIssues that require additional information and/or cannot currently be replicated, but possible bugpossible bugBug was reported but is not confirmed or is unable to be replicated.Bug was reported but is not confirmed or is unable to be replicated.
Description
How are you running AnythingLLM?
Docker (local)
What happened?
Getting this error when running multiple queries concurrently.
2025-06-23 11:05:29 [backend] error: TypeError: tokenizer is not a function
2025-06-23 11:05:29 at NativeEmbeddingReranker.rerank (/app/server/utils/EmbeddingRerankers/native/index.js:215:20)
2025-06-23 11:05:29 at async Object.rerankedSimilarityResponse (/app/server/utils/vectorDbProviders/lance/index.js:114:5)
2025-06-23 11:05:29 at async Object.performSimilaritySearch (/app/server/utils/vectorDbProviders/lance/index.js:405:9)
2025-06-23 11:05:29 at async Object.chatSync (/app/server/utils/chats/apiChatHandler.js:213:9)
2025-06-23 11:05:29 at async /app/server/endpoints/api/workspace/index.js:681:24
2025-06-23 11:05:29 [backend] error: LanceDB::rerankedSimilarityResponse tokenizer is not a function
This results in the sources being returned as empty array.
Based on my analysis,
The issue seems to be due to this assignment here.
I think when we run multiple queries concurrently, the NativeEmbeddingReranker.#transformers gets set in the first query (api call) while the second query exits from here
This causes the tokenizer here to be undefined here
and we get the error: TypeError: tokenizer is not a function
Are there known steps to reproduce?
-
Run anything labs locally on docker
-
Use default system embedding model
-
Load some documents into your workspace
-
Run multiple chats in query mode in parallel. My concurrency was 2.
timothycarambat
Metadata
Metadata
Assignees
Labels
investigatingCore team or maintainer will or is currently looking into this issueCore team or maintainer will or is currently looking into this issueneeds info / can't replicateIssues that require additional information and/or cannot currently be replicated, but possible bugIssues that require additional information and/or cannot currently be replicated, but possible bugpossible bugBug was reported but is not confirmed or is unable to be replicated.Bug was reported but is not confirmed or is unable to be replicated.