Submit tool outputs to run
POST
/v1/threads/run/submit_tool_outputs请求参数
Query 参数
GroupId
string
必需
示例值:
${Groupid}
Header 参数
Authorization
string
必需
示例值:
Bearer ${API KEY}
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
thread_id
string
必需
run_id
string
必需
tool_outputs
array [object {2}]
工具输出列表
tool_call_id
string
工具 id
output
string
输出
示例
{
"thread_id": "thread_abc123",
"run_id": "run_abc123",
"tool_outputs": [
{
"tool_call_id": "call_abc123",
"output": "内容"
}
]
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
Run id
object
string
对象:run
created_at
integer
创建时间戳
assistant_id
string
必需
对应assistantassistantid
thread_id
string
threadid
run_id
string
必需
status
string
状态
started_at
integer
开始运行时间戳
expires_at
integer
过期时间戳
cancelled_at
integer
取消时间戳
failed_at
integer
失败时间戳
completed_at
integer
成功时间戳
last_error
null
错误信息
model
string
模型名称
instructions
string
必需
覆盖assistiant的指令集
tools
array [object {2}]
启用的工具列表
type
string
必需
function
object
可选
file_ids
array[string]
启用的工具列表
metadata
null
元信息
base_resp
object
必需
status_code+status_message
status_code
integer
必需
status_msg
string
必需
示例
{
"id": "run_abc123",
"object": "thread.run",
"created_at": 1703239536,
"assistant_id": "asst_abc123",
"thread_id": "thread_abc123",
"run_id": "",
"status": "queued",
"started_at": 1703239536,
"expires_at": 0,
"cancelled_at": 0,
"failed_at": 0,
"completed_at": 0,
"last_error": null,
"model": "abab5.5-chat",
"instructions": "Follow the instructions carefully",
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "get weather",
"parameters": {
"type": "object",
"required": [
"city"
],
"properties": {
"city": {
"type": "string"
}
}
}
}
},
{
"type": "code_interpreter"
}
],
"file_ids": [
"${file id}"
],
"metadata": null,
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}
修改于 9 个月前