feat: update paragraph processing to include status updates for embedding tasks
--bug=1058487 --user=刘瑞斌 【知识库】在文档中添加分段,没有执行向量化操作 https://www.tapd.cn/62980211/s/1728041
This commit is contained in:
parent
4f4565f85b
commit
0bcf7e311c
@ -305,6 +305,10 @@ class ParagraphSerializers(serializers.Serializer):
|
|||||||
if with_embedding:
|
if with_embedding:
|
||||||
model_id = get_embedding_model_id_by_knowledge_id(knowledge_id)
|
model_id = get_embedding_model_id_by_knowledge_id(knowledge_id)
|
||||||
embedding_by_paragraph(str(paragraph.id), model_id)
|
embedding_by_paragraph(str(paragraph.id), model_id)
|
||||||
|
ListenerManagement.update_status(
|
||||||
|
QuerySet(Document).filter(id=document_id), TaskType.EMBEDDING, State.SUCCESS
|
||||||
|
)
|
||||||
|
ListenerManagement.get_aggregation_document_status(document_id)()
|
||||||
return ParagraphSerializers.Operate(
|
return ParagraphSerializers.Operate(
|
||||||
data={
|
data={
|
||||||
'paragraph_id': str(paragraph.id),
|
'paragraph_id': str(paragraph.id),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user