mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #5637] issue: Embedding Failure - Too Many Requests for url #133790
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bgeneto on GitHub (Sep 23, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5637
Bug Report
Installation Method
Docker compose
Environment
Open WebUI Version: v0.3.23
Ollama (if applicable): n/a
Operating System: Debian 12
Browser (if applicable): Firefox 98.0
Confirmation:
Expected Behavior:
Actual Behavior:
Description
Bug Summary:
If one set
Chunk Sizeto a reasonable value, say512or1024, in Settings → Documents and tries to add a not too large (+300KB .txt) document usinghttps://api.jina.ai/v1embedding modeljina-embeddings-v3, then the error showed below is triggered.The vector database is not updated but the document is uploaded and available, leaving the user thinking that everything worked. But, In fact, the context will be empty for this document if used in a # query.
The problem occurs even with OpenAI models like
text-embedding-3-large. The solution is to use a very large (and unreasonable) chunk sizes like 32K or 64K.I think we need a clear notification message indicating that embedding failed and, additionally, remove the uploaded document. Maybe also implement some rate limit for
v1/embeddingsembeddingsendpoints.Reproduction Details
Steps to Reproduce:
jina-embeddings-v3embedding model via URLhttps://api.jina.ai/v1(api key readily available here, no registration required)Logs and Screenshots
Browser Console Logs:
n/a
Docker Container Logs:
Screenshots/Screen Recordings (if applicable):
Additional Information
n/a
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
@tjbck commented on GitHub (Sep 23, 2024):
#5638
@bgeneto commented on GitHub (Sep 23, 2024):
After further investigation, I discovered that the Open WebUI's Chunk Size setting is not directly related to the embedding model's context length. Specifically, Chunk Size refers to the query or text character length, not the word/token length. By significantly increasing the Chunk size to 16000 (a word is 7 chars on avg), I was able to resolve the issue, and the system now handles large text files with ease yielding amazing results with jinaai/jina-embeddings-v3 embedding model with the default sentence-transformers/all-MiniLM-L6-v2 reranking.
@thiswillbeyourgithub commented on GitHub (Sep 23, 2024):
@bgeneto not strictly in topic but you might be interested in my discussion at https://github.com/open-webui/open-webui/discussions/5333