fix: #26668 restore manual tool parameter values (#26733)

Co-authored-by: renzeyu1 <renzeyu1@lixiang.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Arno Ren 2025-10-10 23:37:10 +08:00 committed by GitHub
parent d0dd81cf84
commit 78f09801b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -252,7 +252,10 @@ class AgentNode(Node):
if all(isinstance(v, dict) for _, v in parameters.items()):
params = {}
for key, param in parameters.items():
if param.get("auto", ParamsAutoGenerated.OPEN.value) == ParamsAutoGenerated.CLOSE.value:
if param.get("auto", ParamsAutoGenerated.OPEN.value) in (
ParamsAutoGenerated.CLOSE.value,
0,
):
value_param = param.get("value", {})
params[key] = value_param.get("value", "") if value_param is not None else None
else: