fix: 修复上传文档时,向量化未发布异步任务
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
shaohuzhang1 2024-08-22 15:10:25 +08:00 committed by shaohuzhang1
parent d63e9354e4
commit 3b35a2cf69

View File

@ -799,7 +799,7 @@ class DocumentSerializers(ApiMixin, serializers.Serializer):
def post_embedding(document_list, dataset_id):
for document_dict in document_list:
model_id = get_embedding_model_id_by_dataset_id(dataset_id)
embedding_by_document(document_dict.get('id'), model_id)
embedding_by_document.delay(document_dict.get('id'), model_id)
return document_list
@post(post_function=post_embedding)