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)
This commit is contained in:
Kevin Hu 2025-03-25 11:13:22 +08:00 committed by GitHub
parent b2ec39c59d
commit 384b6549a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))