Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/maxkb-dev/maxkb
Browse files Browse the repository at this point in the history
  • Loading branch information
liqiang-fit2cloud committed Nov 28, 2024
2 parents 58c0c34 + c3d92e8 commit 514618b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def execute(self, document, **kwargs):
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def save_context(self, details, workflow_manage):
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)
Expand Down

0 comments on commit 514618b

Please sign in to comment.