fix: 修复直接回答对话无法显示文本

This commit is contained in:
shaohuzhang1 2024-11-13 17:38:31 +08:00 committed by shaohuzhang1
parent 6102c71307
commit c866d05f33

View File

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