open-webui/backend
google-labs-jules[bot] 4a7e1b93e5 Fix: Prevent RAG queries when all files are in full context
This commit fixes an issue where Retrieval-Augmented Generation (RAG)
queries were still being generated even when all attached files were set
to 'full context' mode. This was inefficient as the full content of the
files was already available to the model.

The `chat_completion_files_handler` in `backend/open_webui/utils/middleware.py`
has been updated to:
- Check if all attached files have the `context: 'full'` property.
- Skip the `generate_queries` step if all files are in full context mode.
- Pass a `full_context=True` flag to the `get_sources_from_items`
  function to ensure it fetches the entire document content instead of
  performing a vector search.

This change ensures that RAG queries are only generated when necessary,
improving the efficiency of the system.
2025-09-25 15:54:58 +00:00
..
data
open_webui Fix: Prevent RAG queries when all files are in full context 2025-09-25 15:54:58 +00:00
.dockerignore
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh feat: add Feishu OAuth integration 2025-09-12 14:09:32 +08:00
requirements.txt chore: bump chroma 2025-09-09 19:13:41 +04:00
start.sh fix: Resolve admin account creation on Hugging Face Spaces. 2025-08-31 14:33:48 +07:00
start_windows.bat fix: windows start script 2025-06-27 15:46:38 +04:00