[fix]: issue#9443support object type in custom tool's parameters

This commit is contained in:
dufei 2024-10-25 09:38:15 +08:00
parent dd17506078
commit 86ba0d47a7
2 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,7 @@ class ToolParameter(BaseModel):
SECRET_INPUT = "secret-input"
FILE = "file"
FILES = "files"
OBJECT = "object"
# deprecated, should not use.
SYSTEM_FILES = "systme-files"

View File

@ -170,6 +170,8 @@ class ApiBasedToolSchemaParser:
return ToolParameter.ToolParameterType.NUMBER
elif typ == "boolean":
return ToolParameter.ToolParameterType.BOOLEAN
elif typ == 'object':
return ToolParameter.ToolParameterType.OBJECT
elif typ == "string":
return ToolParameter.ToolParameterType.STRING