From 36755672ba42da7335dc710ccdea9fdc482f6e4a Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 2 Dec 2024 18:09:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=90=86=E8=A7=A3=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E4=B8=BA?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=97=B6=E5=9B=BE=E7=89=87=E6=B2=A1=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/base_image_understand_node.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py b/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py index 1817ba56a..9e09e8a8e 100644 --- a/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py +++ b/apps/application/flow/step_node/image_understand_step_node/impl/base_image_understand_node.py @@ -115,7 +115,11 @@ class BaseImageUnderstandNode(IImageUnderstandNode): image_list = data['image_list'] if len(image_list) == 0 or data['dialogue_type'] == 'WORKFLOW': return HumanMessage(content=chat_record.problem_text) - return HumanMessage(content=data['question']) + file_id = image_list[0]['file_id'] + return HumanMessage(content=[ + {'type': 'text', 'text': data['question']}, + {'type': 'image_url', 'image_url': {'url': f'/api/file/{file_id}'}}, + ]) return HumanMessage(content=chat_record.problem_text) def get_history_message(self, history_chat_record, dialogue_number):