Merge branch 'main' of https://github.com/maxkb-dev/maxkb
This commit is contained in:
commit
514618bddb
@ -16,7 +16,7 @@ class BaseDocumentExtractNode(IDocumentExtractNode):
|
|||||||
self.context['document_list'] = document
|
self.context['document_list'] = document
|
||||||
content = []
|
content = []
|
||||||
splitter = '\n`-----------------------------------`\n'
|
splitter = '\n`-----------------------------------`\n'
|
||||||
if document is None:
|
if document is None or not isinstance(document, list):
|
||||||
return NodeResult({'content': content}, {})
|
return NodeResult({'content': content}, {})
|
||||||
|
|
||||||
for doc in document:
|
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,
|
def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream, chat_id, chat_record_id,
|
||||||
image,
|
image,
|
||||||
**kwargs) -> NodeResult:
|
**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'))
|
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)
|
history_message =self.get_history_message_for_details(history_chat_record, dialogue_number)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user