fix: Enterprise WeChat docking sub application cannot output thinking process (#2489)
This commit is contained in:
parent
b6da5fb79b
commit
e420a01e0d
@ -115,6 +115,10 @@ def write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wor
|
|||||||
'prompt_tokens': response.get('prompt_tokens')}}
|
'prompt_tokens': response.get('prompt_tokens')}}
|
||||||
answer = response.get('content', '') or "抱歉,没有查找到相关内容,请重新描述您的问题或提供更多信息。"
|
answer = response.get('content', '') or "抱歉,没有查找到相关内容,请重新描述您的问题或提供更多信息。"
|
||||||
reasoning_content = response.get('reasoning_content', '')
|
reasoning_content = response.get('reasoning_content', '')
|
||||||
|
answer_list = response.get('answer_list', [])
|
||||||
|
node_variable['application_node_dict'] = {answer.get('real_node_id'): {**answer, 'index': index} for answer, index
|
||||||
|
in
|
||||||
|
zip(answer_list, range(len(answer_list)))}
|
||||||
_write_context(node_variable, workflow_variable, node, workflow, answer, reasoning_content)
|
_write_context(node_variable, workflow_variable, node, workflow, answer, reasoning_content)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class OpenaiToResponse(BaseToResponse):
|
|||||||
other_params = {}
|
other_params = {}
|
||||||
data = ChatCompletion(id=chat_record_id, choices=[
|
data = ChatCompletion(id=chat_record_id, choices=[
|
||||||
BlockChoice(finish_reason='stop', index=0, chat_id=chat_id,
|
BlockChoice(finish_reason='stop', index=0, chat_id=chat_id,
|
||||||
reasoning_content=other_params.get('reasoning_content', ""),
|
answer_list=other_params.get('answer_list', ""),
|
||||||
message=ChatCompletionMessage(role='assistant', content=content))],
|
message=ChatCompletionMessage(role='assistant', content=content))],
|
||||||
created=datetime.datetime.now().second, model='', object='chat.completion',
|
created=datetime.datetime.now().second, model='', object='chat.completion',
|
||||||
usage=CompletionUsage(completion_tokens=completion_tokens,
|
usage=CompletionUsage(completion_tokens=completion_tokens,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user