瀏覽代碼

fix: if parameter is not required, continue (#21761)

Co-authored-by: 刘江波 <jiangbo721@163.com>
tags/1.5.1
jiangbo721 4 月之前
父節點
當前提交
9a4c1fe834
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      api/core/workflow/nodes/tool/tool_node.py

+ 3
- 1
api/core/workflow/nodes/tool/tool_node.py 查看文件

@@ -167,7 +167,9 @@ class ToolNode(BaseNode[ToolNodeData]):
if tool_input.type == "variable":
variable = variable_pool.get(tool_input.value)
if variable is None:
raise ToolParameterError(f"Variable {tool_input.value} does not exist")
if parameter.required:
raise ToolParameterError(f"Variable {tool_input.value} does not exist")
continue
parameter_value = variable.value
elif tool_input.type in {"mixed", "constant"}:
segment_group = variable_pool.convert_template(str(tool_input.value))

Loading…
取消
儲存