refactor: Support the generated images horizontal tiling display
--story=1017907 --user=刘瑞斌 【越秀农牧】图片生成节点,生成的图片,希望可以支持横向平铺展示 https://www.tapd.cn/57709429/s/1659636v3.2
parent
1811a80ecc
commit
c92ad06092
|
|
@ -47,7 +47,7 @@ class BaseImageGenerateNode(IImageGenerateNode):
|
||||||
file_url = FileSerializer(data={'file': file, 'meta': meta}).upload()
|
file_url = FileSerializer(data={'file': file, 'meta': meta}).upload()
|
||||||
file_urls.append(file_url)
|
file_urls.append(file_url)
|
||||||
self.context['image_list'] = [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls]
|
self.context['image_list'] = [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls]
|
||||||
answer = '\n'.join([f"" for path in file_urls])
|
answer = ' '.join([f"" for path in file_urls])
|
||||||
return NodeResult({'answer': answer, 'chat_model': tti_model, 'message_list': message_list,
|
return NodeResult({'answer': answer, 'chat_model': tti_model, 'message_list': message_list,
|
||||||
'image': [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls],
|
'image': [{'file_id': path.split('/')[-1], 'url': path} for path in file_urls],
|
||||||
'history_message': history_message, 'question': question}, {})
|
'history_message': history_message, 'question': question}, {})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue