mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复文档提取参数选择了开始问题报会话不存在的问题
--bug=1049648 --user=刘瑞斌 【应用编排】文档内容提取节点,节点设置选择 “开始-用户问题” 对话报错 https://www.tapd.cn/57709429/s/1619714
This commit is contained in:
parent
b7905198a2
commit
c3d92e8dc8
|
|
@ -16,7 +16,7 @@ class BaseDocumentExtractNode(IDocumentExtractNode):
|
|||
self.context['document_list'] = document
|
||||
content = []
|
||||
splitter = '\n`-----------------------------------`\n'
|
||||
if document is None:
|
||||
if document is None or not isinstance(document, list):
|
||||
return NodeResult({'content': content}, {})
|
||||
|
||||
for doc in document:
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ class BaseImageUnderstandNode(IImageUnderstandNode):
|
|||
def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream, chat_id, chat_record_id,
|
||||
image,
|
||||
**kwargs) -> NodeResult:
|
||||
# 处理不正确的参数
|
||||
if image is None or not isinstance(image, list):
|
||||
image = []
|
||||
|
||||
image_model = get_model_instance_by_model_user_id(model_id, self.flow_params_serializer.data.get('user_id'))
|
||||
# 执行详情中的历史消息不需要图片内容
|
||||
history_message =self.get_history_message_for_details(history_chat_record, dialogue_number)
|
||||
|
|
|
|||
Loading…
Reference in New Issue