fix: 修复应用编排调试应用,问题优化节点报错

This commit is contained in:
shaohuzhang1 2024-10-18 14:55:42 +08:00 committed by shaohuzhang1
parent c2564a47bd
commit 88bf5c25d2
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
if step_variable is not None:
for key in step_variable:
node.context[key] = step_variable[key]
if workflow.is_result() and 'result' in step_variable:
if workflow.is_result(node, NodeResult(step_variable, global_variable)) and 'result' in step_variable:
result = str(step_variable['result']) + '\n'
yield result
workflow.answer += result

View File

@ -31,7 +31,7 @@ def _write_context(node_variable: Dict, workflow_variable: Dict, node: INode, wo
node.context['history_message'] = node_variable['history_message']
node.context['question'] = node_variable['question']
node.context['run_time'] = time.time() - node.context['start_time']
if workflow.is_result():
if workflow.is_result(node, NodeResult(node_variable, workflow_variable)):
workflow.answer += answer