mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #18292] [CLOSED] feat: Added option to prevent attachment of individual files from knowledges #47790
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18292
Author: @expruc
Created: 10/13/2025
Status: ❌ Closed
Base:
dev← Head:feat/toggle_indivisual_files_attachment📝 Commits (4)
aeb43f0Added option to prevent attachment of individual files from knowledgesd42e8d2fixed knowledge attachment using # not filtering out knowledge files4e61514added option to toggle from UI (general settings)ebdf5a7cleanup📊 Changes
7 files changed (+36 additions, -3 deletions)
View changed files
📝
backend/open_webui/config.py(+7 -0)📝
backend/open_webui/main.py(+6 -0)📝
backend/open_webui/routers/auths.py(+6 -0)📝
src/lib/components/admin/Settings/General.svelte(+7 -0)📝
src/lib/components/chat/MessageInput/Commands/Knowledge.svelte(+5 -1)📝
src/lib/components/chat/MessageInput/InputMenu/Knowledge.svelte(+4 -2)📝
src/lib/stores/index.ts(+1 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
Added an option to prevent attachment of individual files from knowledges (only full knowledges are attachable, see screenshot below).
Added
New environment variable
ENABLE_INDIVIDUAL_KNOWLEDGE_FILE_ATTACHMENTSwhich controls whether attachment of single files from knowledges on the chat interface is allowed or not. If disabled, only full knowledges are allowed to be attached. Defaults totrue(enabled).Additional Information
Motivation for this PR: slowness on cases with large knowledges (for example as mentioned in #17998). The cause for this slowness is loading all the knowledge in the background, files even if they are not attached or referenced by the knowledge.
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.