fix: 修复函数库节点为输出节点时类型错误

This commit is contained in:
shaohuzhang1 2024-08-15 18:31:11 +08:00 committed by shaohuzhang1
parent 19b07e92f3
commit 845ee524c4
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
for key in step_variable:
node.context[key] = step_variable[key]
if workflow.is_result() and 'result' in step_variable:
result = step_variable['result'] + '\n'
result = str(step_variable['result']) + '\n'
yield result
workflow.answer += result
node.context['run_time'] = time.time() - node.context['start_time']

View File

@ -25,7 +25,7 @@ def write_context(step_variable: Dict, global_variable: Dict, node, workflow):
for key in step_variable:
node.context[key] = step_variable[key]
if workflow.is_result() and 'result' in step_variable:
result = step_variable['result'] + '\n'
result = str(step_variable['result']) + '\n'
yield result
workflow.answer += result
node.context['run_time'] = time.time() - node.context['start_time']