Authorization: Bearer ********************curl --location --request GET 'https://api.toiotech.com/v1/formulas//tools' \
--header 'Authorization: Bearer <token>'{
"object": "list",
"tools": [
{
"function": {
"name": "random_choice",
"description": "随机选择工具,支持从候选项中随机选择指定数量的项目,可选择是否放回,支持加权选择",
"parameters": {
"properties": {
"candidates": {
"description": "候选项列表,必须是字符串数组",
"items": {
"type": "string"
},
"type": "array"
},
"count": {
"default": 1,
"description": "选择数量,默认为1",
"type": "integer"
},
"format": {
"default": "simple",
"description": "输出格式:simple(简单列表), detailed(详细信息), json(JSON格式)",
"enum": [
"simple",
"detailed",
"json"
],
"type": "string"
},
"replace": {
"default": false,
"description": "是否放回(允许重复选择),默认为false",
"type": "boolean"
},
"seed": {
"description": "随机种子,用于可重现的随机结果",
"type": "integer"
},
"weights": {
"description": "权重列表,与candidates对应,用于加权随机选择",
"items": {
"type": "number"
},
"type": "array"
}
},
"required": [
"candidates"
],
"type": "object"
}
},
"type": "function"
}
]
}