mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
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. |
||
|---|---|---|
| .. | ||
| images | ||
| telemetry | ||
| access_control.py | ||
| audit.py | ||
| auth.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| embeddings.py | ||
| filter.py | ||
| logger.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| redis.py | ||
| response.py | ||
| security_headers.py | ||
| task.py | ||
| tools.py | ||
| webhook.py | ||