fix: Workflow non streaming dialogue cannot respond (#2188)

This commit is contained in:
shaohuzhang1 2025-02-10 10:58:41 +08:00 committed by GitHub
parent d4fbf0997a
commit cdb804bb88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -335,7 +335,9 @@ class WorkflowManage:
answer_tokens = sum([row.get('answer_tokens') for row in details.values() if
'answer_tokens' in row and row.get('answer_tokens') is not None])
answer_text_list = self.get_answer_text_list()
answer_text = '\n\n'.join(answer['content'] for answer in answer_text_list)
answer_text = '\n\n'.join(
'\n\n'.join([a.get('content') for a in answer]) for answer in
answer_text_list)
self.work_flow_post_handler.handler(self.params['chat_id'], self.params['chat_record_id'],
answer_text,
self)