mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 04:16:03 -05:00
[GH-ISSUE #12832] issue: Web Search Feature Fails When Encountering Empty Content #55393
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 @belugaming on GitHub (Apr 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12832
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.4
Ollama Version (if applicable)
Not applicable
Operating System
macos sequoia
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When encountering empty content during a web search:
Actual Behavior
When performing a web search and one of the retrieved pages returns empty content:
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.exceptionSteps to Reproduce
Logs & Screenshots
2025-04-14 04:33:24.278 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:821 - save_docs_to_vector_db: document https://m.ease100.com/toefl/vocabulary/631.html web-search-260deb2eb1113a0545a9112e9d642238a8fb233195726e7d6624 - {}
2025-04-14 04:33:24.278 | ERROR | open_webui.routers.retrieval:process_web_search:1545 - The content provided is empty. Please ensure that there is text or data present before proceeding. - {}
Traceback (most recent call last):
...
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
...
File "/app/backend/open_webui/routers/retrieval.py", line 1546, in process_web_search
raise HTTPException(
└ <class 'fastapi.exceptions.HTTPException'>
fastapi.exceptions.HTTPException: 400: [ERROR: The content provided is empty. Please ensure that there is text or data present before proceeding.]
Additional Information
The error occurs in the
save_docs_to_vector_dbfunction inretrieval.py. Instead of raising aValueErrorwhen encountering empty content, the function should log the issue and continue processing other resources.Specifically, at line 863 in
retrieval.py, a more robust error handling approach is needed to skip empty resources rather than failing the entire search process.This issue severely impacts the reliability of the web search feature, as any search query that happens to include an empty resource will fail completely, leaving users without any results despite other valid resources being available.
@tjbck commented on GitHub (Apr 14, 2025):
PR welcome.
@tjbck commented on GitHub (Apr 14, 2025):
70718dda90might've addressed, testing wanted here.