Hume AI
  1. 工具
Hume AI
  • 简介
  • 共情语音界面 (EVI)
    • 工具
      • 列出工具
        GET
      • 创建工具
        POST
      • 列出工具版本
        GET
      • 创建工具版本
        POST
      • 删除工具
        DELETE
      • 更新工具名称
        PATCH
      • 获取工具版本
        GET
      • 删除工具版本
        DELETE
      • 更新工具说明
        PATCH
    • 提示
      • 创建提示
      • 列表提示
      • 列出提示版本
      • 创建提示版本
      • 删除提示
      • 更新提示名称
      • 获取提示版本
      • 删除提示版本
      • 更新提示说明
    • 配置
      • 列出配置
      • 创建配置
      • 列出配置版本
      • 创建配置版本
      • 删除配置
      • 更新配置名称
      • 获取配置版本
      • 删除配置版本
      • 更新配置描述
    • 聊天
      • 列出聊天
      • 列出聊天事件
  • 表达测量 API
    • Batch
      • 列出作业
      • 开始推理作业
      • 获取职位详情
      • 获取工作预测
      • 获取作业工件
      • 从本地文件启动推理作业
  • 自定义模型 API
    • 文件
      • 列出文件
      • 创建文件
      • 上传文件
      • 获取文件
      • 删除文件
      • 更新文件名
      • 获取文件预测
    • 数据集
      • 列出数据集
      • 创建数据集
      • 获取数据集
      • 创建数据集版本
      • 删除数据集
      • 列出数据集版本
      • 列出数据集文件
      • 获取数据集版本
      • 列出数据集版本文件
    • 模型
      • 列出模型
      • 获取模型详细信息
      • 更新模型名称
      • 列出模型版本
      • 获取模型版本
      • 更新模型描述
    • 工作
      • 开始训练工作
      • 启动自定义模型推理作业
  1. 工具

创建工具

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v0/evi/tools
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v0/evi/tools' \
--header 'X-Hume-Api-Key: <apiKey>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "get_current_weather",
  "parameters": "{ \"type\": \"object\", \"properties\": { \"location\": { \"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\" }, \"format\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"], \"description\": \"The temperature unit to use. Infer this from the users location.\" } }, \"required\": [\"location\", \"format\"] }",
  "version_description": "Fetches current weather and uses celsius or fahrenheit based on location of user.",
  "description": "This tool is for getting the current weather.",
  "fallback_content": "Unable to fetch current weather."
}'
响应示例响应示例
{
  "tool_type": "FUNCTION",
  "id": "aa9b71c4-723c-47ff-9f83-1a1829e74376",
  "version": 0,
  "version_type": "FIXED",
  "name": "get_current_weather",
  "created_on": 1715275452390,
  "modified_on": 1715275452390,
  "parameters": "{ \"type\": \"object\", \"properties\": { \"location\": { \"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\" }, \"format\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"], \"description\": \"The temperature unit to use. Infer this from the users location.\" } }, \"required\": [\"location\", \"format\"] }",
  "version_description": "Fetches current weather and uses celsius or fahrenheit based on location of user.",
  "fallback_content": "Unable to fetch current weather.",
  "description": "This tool is for getting the current weather."
}

请求参数

Header 参数
X-Hume-Api-Key
string 
必需
示例值:
<apiKey>
Content-Type
string 
必需
示例值:
application/json
Body 参数application/json
name
string 
必需
适用于特定工具的所有版本的名称。
parameters
string 
必需
字符串化的 JSON 定义此版本的工具所使用的参数。
version_description
string 
可选
附加到工具特定版本的描述。
description
string 
可选
描述该工具功能的文本。
fallback_content
string 
可选
如果工具无法生成内容则使用的文本。
示例

返回响应

🟢200成功
application/json
Body
tool_type
string 
必需
工具类型。值来自 ToolType 枚举。
id
string 
必需
工具标识符。格式为 UUID。
version
integer 
必需
工具的版本号。版本号应为整数。configId 和版本号的组合是唯一的。
version_type
string 
必需
指示此工具是使用固定版本号还是自动更新到最新版本。值来自 VersionType 枚举。
name
string 
必需
适用于特定工具的所有版本的名称。
created_on
integer 
必需
创建此工具第一个版本的时间戳。
modified_on
integer 
必需
此版本工具的创建时间戳。
parameters
string 
必需
字符串化的 JSON 定义此版本的工具所使用的参数。
version_description
string 
必需
附加到工具特定版本的描述。
fallback_content
string 
必需
如果工具无法生成内容则使用的文本。
description
string 
必需
描述该工具功能的文本。
修改于 2024-05-29 06:28:16
上一页
列出工具
下一页
列出工具版本
Built with