feat: support custom tool upload file (#10796)
This commit is contained in:
parent
25fda7adc5
commit
bf4b6e5f80
2 changed files with 13 additions and 3 deletions
|
|
@ -161,6 +161,9 @@ class ApiBasedToolSchemaParser:
|
|||
def _get_tool_parameter_type(parameter: dict) -> ToolParameter.ToolParameterType:
|
||||
parameter = parameter or {}
|
||||
typ = None
|
||||
if parameter.get("format") == "binary":
|
||||
return ToolParameter.ToolParameterType.FILE
|
||||
|
||||
if "type" in parameter:
|
||||
typ = parameter["type"]
|
||||
elif "schema" in parameter and "type" in parameter["schema"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue