创建线程并运行
POST
https://api.openai.com/v1/threads/runs
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/threads/runs' \
--header 'Content-Type: application/json' \
--data-raw '{
"assistant_id": "asst_IgmpQTah3ZfPHCVZjTqAY8Kv",
"thread": {
"messages": [
{"role": "user", "content": "Explain deep learning to a 5 year old."}
]
}
}'
响应示例响应示例
{
"id": "string",
"object": "string",
"created_at": 0,
"assistant_id": "string",
"thread_id": "string",
"status": "string",
"started_at": null,
"expires_at": 0,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"last_error": null,
"model": "string",
"instructions": "string",
"tools": [
"string"
],
"file_ids": [
"string"
],
"metadata": {}
}
请求参数
Body 参数application/json
返回响应
修改于 2023-11-09 10:26:35