fix issue: update document segment setting failed (#10107)

This commit is contained in:
Jyong 2024-10-31 15:51:33 +08:00 committed by GitHub
parent cee1c4f63d
commit 0154a26e0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -736,11 +736,12 @@ class DocumentService:
dataset.retrieval_model = document_data.get("retrieval_model") or default_retrieval_model
documents = []
batch = time.strftime("%Y%m%d%H%M%S") + str(random.randint(100000, 999999))
if document_data.get("original_document_id"):
document = DocumentService.update_document_with_dataset_id(dataset, document_data, account)
documents.append(document)
batch = document.batch
else:
batch = time.strftime("%Y%m%d%H%M%S") + str(random.randint(100000, 999999))
# save process rule
if not dataset_process_rule:
process_rule = document_data["process_rule"]