feat: handle none value

This commit is contained in:
Novice
2025-06-12 09:57:25 +08:00
parent 671136f5e6
commit 6f1cc457a4

View File

@ -937,6 +937,9 @@ class ToolManager:
# save tool parameter to tool entity memory
if parameter.form == ToolParameter.ToolParameterForm.FORM:
if variable_pool:
config = tool_configurations.get(parameter.name, {})
if not (config and isinstance(config, dict) and config.get("value") is not None):
continue
tool_input = ToolNodeData.ToolInput(**tool_configurations.get(parameter.name, {}))
if tool_input.type == "variable":
variable = variable_pool.get(tool_input.value)