Originally created by @manwallet on GitHub (Apr 14, 2025).
Check Existing Issues
I have searched the existing issues and discussions.
I am using the latest version of Open WebUI.
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
I have read and followed all instructions in README.md.
I am using the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
I have listed steps to reproduce the bug in detail.
Expected Behavior
When encountering empty content during a web search:
The system should log the issue but skip the problematic resource
The search should continue processing other valid resources
The user should receive partial results from the successfully processed pages
At minimum, provide a more helpful error message that doesn't terminate the entire request
Actual Behavior
When performing a web search and one of the retrieved pages returns empty content:
The system raises a ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding. exception
The entire web search functionality fails with HTTP 400 error
The user receives no results, even from successfully retrieved and processed pages
The API request fails completely instead of returning partial results
Steps to Reproduce
Send a chat message that triggers web search (with a query like "托福词汇记忆方法")
Observe that the search attempts to fetch multiple resources
When one of the resources returns empty content, the entire search fails
No search results are returned despite some resources being successfully retrieved
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_db function in retrieval.py. Instead of raising a ValueError when 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.
Originally created by @manwallet on GitHub (Apr 14, 2025).
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### 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
- [x] I have read and followed all instructions in `README.md`.
- [x] I am using the latest version of **both** Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### Expected Behavior
When encountering empty content during a web search:
1. The system should log the issue but skip the problematic resource
2. The search should continue processing other valid resources
3. The user should receive partial results from the successfully processed pages
4. At minimum, provide a more helpful error message that doesn't terminate the entire request
### Actual Behavior
When performing a web search and one of the retrieved pages returns empty content:
1. The system raises a `ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.` exception
2. The entire web search functionality fails with HTTP 400 error
3. The user receives no results, even from successfully retrieved and processed pages
4. The API request fails completely instead of returning partial results
### Steps to Reproduce
1. Send a chat message that triggers web search (with a query like "托福词汇记忆方法")
2. Observe that the search attempts to fetch multiple resources
3. When one of the resources returns empty content, the entire search fails
4. No search results are returned despite some resources being successfully retrieved
### 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_db` function in `retrieval.py`. Instead of raising a `ValueError` when 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.
GiteaMirror
added the bug label 2025-11-11 16:04:15 -06:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @manwallet on GitHub (Apr 14, 2025).
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.