From e65ec1c6ccd6180dd8782dd043e8568ea641875a Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 17 Nov 2024 02:40:47 -0800 Subject: [PATCH] fix: knowledge --- backend/open_webui/apps/webui/routers/knowledge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/apps/webui/routers/knowledge.py b/backend/open_webui/apps/webui/routers/knowledge.py index 1ffadeac2..537eed5da 100644 --- a/backend/open_webui/apps/webui/routers/knowledge.py +++ b/backend/open_webui/apps/webui/routers/knowledge.py @@ -276,7 +276,7 @@ def add_file_to_knowledge_by_id( file_ids.append(form_data.file_id) data["file_ids"] = file_ids - knowledge = Knowledges.update_knowledge_data_by_id(id=id.id, data=data) + knowledge = Knowledges.update_knowledge_data_by_id(id=id, data=data) if knowledge: files = Files.get_files_by_ids(file_ids) @@ -410,7 +410,7 @@ def remove_file_from_knowledge_by_id( file_ids.remove(form_data.file_id) data["file_ids"] = file_ids - knowledge = Knowledges.update_knowledge_data_by_id(id=id.id, data=data) + knowledge = Knowledges.update_knowledge_data_by_id(id=id, data=data) if knowledge: files = Files.get_files_by_ids(file_ids) @@ -491,6 +491,6 @@ async def reset_knowledge_by_id(id: str, user=Depends(get_verified_user)): log.debug(e) pass - knowledge = Knowledges.update_knowledge_data_by_id(id=id.id, data={"file_ids": []}) + knowledge = Knowledges.update_knowledge_data_by_id(id=id, data={"file_ids": []}) return knowledge