提交工具输出以运行
POST
https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/submit_tool_outputs
status: "requires_action"
和required_action.type
is时submit_tool_outputs
,此端点可用于在工具调用全部完成后提交输出。所有输出必须在单个请求中提交。请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/threads//runs//submit_tool_outputs' \
--header 'Content-Type: application/json' \
--data-raw '{
"tool_outputs": [
{
"tool_call_id": "call_MbELIQcB72cq35Yzo2MRw5qs",
"output": "28C"
}
]
}'
响应示例响应示例
{
"id": "string",
"object": "string",
"created_at": 0,
"assistant_id": "string",
"thread_id": "string",
"status": "string",
"started_at": 0,
"expires_at": 0,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"last_error": null,
"model": "string",
"instructions": "string",
"tools": [
{
"type": "string",
"function": {
"name": "string",
"description": "string",
"parameters": {
"type": "string",
"properties": {
"location": {
"type": "string",
"description": "string"
},
"unit": {
"type": "string",
"enum": [
"string"
]
}
},
"required": [
"string"
]
}
}
}
],
"file_ids": [
"string"
],
"metadata": {}
}
请求参数
Path 参数
thread_id
string
必需
run_id
string
必需
Body 参数application/json
返回响应
修改于 2023-11-09 10:22:48