From c5ac57167629859fc365cd2e7c0318413a2e008b Mon Sep 17 00:00:00 2001 From: jiasu <57079612+jiasu-hezhip@users.noreply.github.com> Date: Mon, 27 Oct 2025 11:29:20 +0800 Subject: [PATCH] Fixed the bug that passing an empty array will not update (#10755) ### What problem does this PR solve? Fixed the bug that the "dataset_ids" field will not be updated if an empty array is passed when updating the assistant ### Type of change - [*] Bug Fix (non-breaking change which fixes an issue) --- api/apps/sdk/chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/apps/sdk/chat.py b/api/apps/sdk/chat.py index 263375e77..44cf2f533 100644 --- a/api/apps/sdk/chat.py +++ b/api/apps/sdk/chat.py @@ -169,6 +169,8 @@ def update(tenant_id, chat_id): if len(embd_count) > 1: return get_result(message='Datasets use different embedding models."', code=settings.RetCode.AUTHENTICATION_ERROR) req["kb_ids"] = ids + else: + req["kb_ids"] = [] llm = req.get("llm") if llm: if "model_name" in llm: