Skip to content

Commit 447393a

Browse files
committed
fix: ensure document ID is converted to string in document list
--bug=1064030 --user=刘瑞斌 【知识库】工作流知识库的文档内容提取节点输出的文档列表,id字段是个UUID对象,后续节点引用后无法解析,需要转成字符串输出 https://www.tapd.cn/62980211/s/1805648
1 parent e83f2bd commit 447393a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def save_image(image_list):
9090
buffer.seek(0)
9191
file_content = split_handle.get_content(buffer, save_image)
9292
content.append('### ' + doc['name'] + '\n' + file_content)
93-
document_list.append({'id': file.id, 'name': doc['name'], 'content': file_content})
93+
document_list.append({'id': str(file.id), 'name': doc['name'], 'content': file_content})
9494
break
9595

9696
return NodeResult({'content': splitter.join(content), 'document_list': document_list}, {})

0 commit comments

Comments
 (0)