fix: tool params not work as expected when develop a tool (#6550)
This commit is contained in:
parent
1690788827
commit
c0ada940bd
4 changed files with 88 additions and 23 deletions
|
|
@ -53,7 +53,7 @@ class ToolParameterConverter:
|
|||
case ToolParameter.ToolParameterType.NUMBER:
|
||||
if isinstance(value, int) | isinstance(value, float):
|
||||
return value
|
||||
elif isinstance(value, str):
|
||||
elif isinstance(value, str) and value != '':
|
||||
if '.' in value:
|
||||
return float(value)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue