Files
open-webui/backend/open_webui/utils
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
..
2025-09-16 12:11:32 -05:00
2025-09-16 22:53:54 -05:00
2025-08-10 02:10:00 +02:00
2025-09-08 18:17:11 +04:00
2025-09-17 00:49:44 -05:00
2025-08-06 14:27:58 +04:00
2025-09-14 10:26:46 +02:00
2025-09-16 23:19:21 -05:00
2025-09-16 11:16:08 -05:00
2025-08-27 17:24:16 +04:00
2025-08-04 14:15:08 +04:00
2025-08-21 04:46:43 +04:00
2025-09-09 19:00:01 +04:00
2025-08-15 00:07:02 +04:00