From bcaac061ac0d174dc4a31b340a2c0d346ade8eae Mon Sep 17 00:00:00 2001 From: Stephen Hu Date: Fri, 25 Jul 2025 10:06:33 +0800 Subject: [PATCH] Feature: Support set chats kbs to empty (#9038) ### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/9034 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- api/apps/sdk/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/sdk/chat.py b/api/apps/sdk/chat.py index 3667dab54..23231bc52 100644 --- a/api/apps/sdk/chat.py +++ b/api/apps/sdk/chat.py @@ -166,7 +166,7 @@ def update(tenant_id, chat_id): kbs = KnowledgebaseService.get_by_ids(ids) embd_ids = [TenantLLMService.split_model_name_and_factory(kb.embd_id)[0] for kb in kbs] # remove vendor suffix for comparison embd_count = list(set(embd_ids)) - if len(embd_count) != 1: + if len(embd_count) > 1: return get_result(message='Datasets use different embedding models."', code=settings.RetCode.AUTHENTICATION_ERROR) req["kb_ids"] = ids llm = req.get("llm")