fix: custom tool input number fail (#6200)

Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>
This commit is contained in:
guogeerandjinqi.guo authored and GitHub committed 2024-07-14 22:11:13 +08:00
1 parent 07add06c59
commit 4fdcb30ff8
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -238,7 +238,7 @@ class ApiTool(Tool):
return int(value)
elif property['type'] == 'number':
# check if it is a float
if '.' in value:
if '.' in str(value):
return float(value)
else:
return int(value)