亮色模式
Create run (v1)
POST
https://api.openai.com/v1/threads/thread_abc123/runsCreate a run.
Request
Header 参数
Authorization
string
必需
示例值:
Bearer $OPENAI_API_KEY
Content-Type
string
必需
示例值:
application/json
OpenAI-Beta
string
必需
示例值:
assistants=v1
Body 参数application/json
assistant_id
string
必需
The ID of the assistant to use to execute this run.
示例
{
"assistant_id": "asst_abc123"
}
Request samples
返回响应
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
数据结构
id
string
必需
object
string
必需
created_at
integer
必需
assistant_id
string
必需
thread_id
string
必需
status
string
必需
started_at
integer
必需
expires_at
null
必需
cancelled_at
null
必需
failed_at
null
必需
completed_at
integer
必需
last_error
null
必需
model
string
必需
instructions
null
必需
incomplete_details
null
必需
tools
array [object {1}]
必需
type
string
可选
file_ids
array[string]
必需
metadata
object
必需
usage
null
必需
temperature
integer
必需
top_p
integer
必需
max_prompt_tokens
integer
必需
max_completion_tokens
integer
必需
truncation_strategy
object
必需
type
string
必需
last_messages
null
必需
response_format
string
必需
tool_choice
string
必需
示例
{
"id": "run_abc123",
"object": "thread.run",
"created_at": 1699063290,
"assistant_id": "asst_abc123",
"thread_id": "thread_abc123",
"status": "queued",
"started_at": 1699063290,
"expires_at": null,
"cancelled_at": null,
"failed_at": null,
"completed_at": 1699063291,
"last_error": null,
"model": "gpt-4-turbo",
"instructions": null,
"incomplete_details": null,
"tools": [
{
"type": "code_interpreter"
}
],
"file_ids": [
"file-abc123",
"file-abc456"
],
"metadata": {},
"usage": null,
"temperature": 1,
"top_p": 1,
"max_prompt_tokens": 1000,
"max_completion_tokens": 1000,
"truncation_strategy": {
"type": "auto",
"last_messages": null
},
"response_format": "auto",
"tool_choice": "auto"
}
最后修改时间: 9 天前