Skip to content

Commit cfd3b6c

Browse files
committed
fix: Enterprise WeChat docking sub application cannot output thinking process
1 parent b6da5fb commit cfd3b6c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/application/flow/step_node/application_node/impl/base_application_node.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wor
115115
'prompt_tokens': response.get('prompt_tokens')}}
116116
answer = response.get('content', '') or "抱歉,没有查找到相关内容,请重新描述您的问题或提供更多信息。"
117117
reasoning_content = response.get('reasoning_content', '')
118+
answer_list = response.get('answer_list', [])
119+
node_variable['application_node_dict'] = {answer.get('real_node_id'): {**answer, 'index': index} for answer, index
120+
in
121+
zip(answer_list, range(len(answer_list)))}
118122
_write_context(node_variable, workflow_variable, node, workflow, answer, reasoning_content)
119123

120124

apps/common/handle/impl/response/openai_to_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def to_block_response(self, chat_id, chat_record_id, content, is_end, completion
2626
other_params = {}
2727
data = ChatCompletion(id=chat_record_id, choices=[
2828
BlockChoice(finish_reason='stop', index=0, chat_id=chat_id,
29-
reasoning_content=other_params.get('reasoning_content', ""),
29+
answer_list=other_params.get('answer_list', ""),
3030
message=ChatCompletionMessage(role='assistant', content=content))],
3131
created=datetime.datetime.now().second, model='', object='chat.completion',
3232
usage=CompletionUsage(completion_tokens=completion_tokens,

0 commit comments

Comments
 (0)