mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-05 18:38:17 -05:00
[PR #8432] [MERGED] fix: Knowledge Base Detachment from Models #22222
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/8432
Author: @juananpe
Created: 1/9/2025
Status: ✅ Merged
Merged: 1/9/2025
Merged by: @tjbck
Base:
dev← Head:kb-detachment-from-models📝 Commits (3)
5b616ddfix: Knowledge Base Detachment from Modelsde735b3fix formatf724900fix frontend format📊 Changes
2 files changed (+31 additions, -1 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+31 -0)📝
src/lib/utils/index.ts(+0 -1)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Fixed an issue where knowledge bases remained linked to models after being deleted from the Knowledge area. This ensures data consistency by properly cleaning up all references when a knowledge base is deleted, preventing orphaned references in models.
An explanation of the scenario before the patch:
When a user wanted to remove a knowledge base from their system, the following scenario would occur:
Initial State:
model.meta.knowledge)User Action:
What Actually Happened:
Resulting Problems:
Technical Issue:
delete_knowledge_by_idendpoint only handled:This created a data consistency issue where models maintained references to non-existent knowledge bases, leading to a confusing user experience and potential issues with model operation.
Fixed
The changes ensure that when a knowledge base is deleted:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.