Skip to content

Commit

Permalink
Resolve variable type parameter error (#6646)
Browse files Browse the repository at this point in the history
  • Loading branch information
majian159 authored Jul 25, 2024
1 parent 91fd852 commit a876baf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions api/core/workflow/nodes/tool/tool_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,15 @@ def _generate_parameters(
]
else:
tool_input = node_data.tool_parameters[parameter_name]
segment_group = parser.convert_template(
template=str(tool_input.value),
variable_pool=variable_pool,
)
result[parameter_name] = segment_group.log if for_log else segment_group.text
if tool_input.type == 'variable':
parameter_value = variable_pool.get(tool_input.value).value
else:
segment_group = parser.convert_template(
template=str(tool_input.value),
variable_pool=variable_pool,
)
parameter_value = segment_group.log if for_log else segment_group.text
result[parameter_name] = parameter_value

return result

Expand Down

0 comments on commit a876baf

Please sign in to comment.