fix: The image of the image understanding node selects the image generated by the preceding node.

--bug=1050695 --user=刘瑞斌 【应用编排】图片理解节点的图片选择前置节点生成的图片,执行详情中加载失败 https://www.tapd.cn/57709429/s/1635547
This commit is contained in:
CaptainB 2024-12-23 14:58:43 +08:00
parent 25b6acb0db
commit 42bd7e60a7

View File

@ -46,7 +46,7 @@ class BaseImageGenerateNode(IImageGenerateNode):
}
file_url = FileSerializer(data={'file': file, 'meta': meta}).upload()
file_urls.append(file_url)
self.context['image_list'] = file_urls
self.context['image_list'] = [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls]
answer = '\n'.join([f"![Image]({path})" for path in file_urls])
return NodeResult({'answer': answer, 'chat_model': tti_model, 'message_list': message_list,
'image': [{'file_id': path.split('/')[-1], 'file_url': path} for path in file_urls],