mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Fix variable assign num not working
--bug=1052497 --user=刘瑞斌 【变量赋值】-将全局变量赋值为num类型,输出时报错 https://www.tapd.cn/57709429/s/1659733
This commit is contained in:
parent
c92ad06092
commit
c433c03fc0
|
|
@ -30,11 +30,15 @@ class BaseVariableAssignNode(IVariableAssignNode):
|
|||
val = json.loads(variable['value'])
|
||||
self.workflow_manage.context[variable['fields'][1]] = val
|
||||
result['output_value'] = variable['value'] = val
|
||||
else:
|
||||
elif variable['type'] == 'string':
|
||||
# 变量解析 例如:{{global.xxx}}
|
||||
val = self.workflow_manage.generate_prompt(variable['value'])
|
||||
self.workflow_manage.context[variable['fields'][1]] = val
|
||||
result['output_value'] = val
|
||||
else:
|
||||
val = variable['value']
|
||||
self.workflow_manage.context[variable['fields'][1]] = val
|
||||
result['output_value'] = val
|
||||
else:
|
||||
reference = self.get_reference_content(variable['reference'])
|
||||
self.workflow_manage.context[variable['fields'][1]] = reference
|
||||
|
|
|
|||
Loading…
Reference in New Issue