fix(core/tools): Fix the issue with iterating over None in _transform_tool_parameters_type. (#5190)
This commit is contained in:
parent
4289f17be2
commit
ed53ef29f4
1 changed files with 2 additions and 2 deletions
|
|
@ -237,7 +237,7 @@ class Tool(BaseModel, ABC):
|
||||||
"""
|
"""
|
||||||
# Temp fix for the issue that the tool parameters will be converted to empty while validating the credentials
|
# Temp fix for the issue that the tool parameters will be converted to empty while validating the credentials
|
||||||
result = deepcopy(tool_parameters)
|
result = deepcopy(tool_parameters)
|
||||||
for parameter in self.parameters:
|
for parameter in self.parameters or []:
|
||||||
if parameter.name in tool_parameters:
|
if parameter.name in tool_parameters:
|
||||||
result[parameter.name] = ToolParameterConverter.cast_parameter_by_type(tool_parameters[parameter.name], parameter.type)
|
result[parameter.name] = ToolParameterConverter.cast_parameter_by_type(tool_parameters[parameter.name], parameter.type)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue