From 384b6549a63981a8935020fb9a2a1e116e0373b5 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 25 Mar 2025 11:13:22 +0800 Subject: [PATCH] Fix: remove doc status checking while creating an assistant. (#6486) ### What problem does this PR solve? #6461 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/sdk/chat.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/api/apps/sdk/chat.py b/api/apps/sdk/chat.py index 9bbe827e2..a5dc5a38f 100644 --- a/api/apps/sdk/chat.py +++ b/api/apps/sdk/chat.py @@ -40,11 +40,6 @@ def create(tenant_id): kb = kbs[0] if kb.chunk_num == 0: return get_error_data_result(f"The dataset {kb_id} doesn't own parsed file") - - # Check if all documents in the knowledge base have been parsed - is_done, error_msg = KnowledgebaseService.is_parsed_done(kb_id) - if not is_done: - return get_error_data_result(error_msg) kbs = KnowledgebaseService.get_by_ids(ids) if ids else [] embd_ids = [TenantLLMService.split_model_name_and_factory(kb.embd_id)[0] for kb in kbs] # remove vendor suffix for comparison @@ -183,11 +178,6 @@ def update(tenant_id, chat_id): if kb.chunk_num == 0: return get_error_data_result(f"The dataset {kb_id} doesn't own parsed file") - # Check if all documents in the knowledge base have been parsed - is_done, error_msg = KnowledgebaseService.is_parsed_done(kb_id) - if not is_done: - return get_error_data_result(error_msg) - 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))