Skip to content

Commit 3675567

Browse files
committed
fix: 修复图片理解历史记录为节点时图片没展示的问题
1 parent 5d4f35d commit 3675567

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ def generate_history_human_message_for_details(self, chat_record):
115115
image_list = data['image_list']
116116
if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW':
117117
return HumanMessage(content=chat_record.problem_text)
118-
return HumanMessage(content=data['question'])
118+
file_id = image_list[0]['file_id']
119+
return HumanMessage(content=[
120+
{'type': 'text', 'text': data['question']},
121+
{'type': 'image_url', 'image_url': {'url': f'/api/file/{file_id}'}},
122+
])
119123
return HumanMessage(content=chat_record.problem_text)
120124

121125
def get_history_message(self, history_chat_record, dialogue_number):

0 commit comments

Comments
 (0)