Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 9 commits into from
1 change: 1 addition & 0 deletions api/core/tools/entities/tool_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class ToolParameterType(StrEnum):
SECRET_INPUT = "secret-input"
FILE = "file"
FILES = "files"
OBJECT = "object"

# deprecated, should not use.
SYSTEM_FILES = "systme-files"
Expand Down
2 changes: 2 additions & 0 deletions api/core/tools/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def _get_tool_parameter_type(parameter: dict) -> Optional[ToolParameter.ToolPara
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
else:
Expand Down