创建助手
POST
https://api.openai.com/v1/assistants
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/assistants' \
--header 'Content-Type: application/json' \
--data-raw '{
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
"name": "Math Tutor"
"tools": [{"type": "code_interpreter"}],
"model": "gpt-4"
}'
响应示例响应示例
{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1698984975,
"name": "Math Tutor",
"description": null,
"model": "gpt-4",
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
"tools": [
{
"type": "code_interpreter"
}
],
"file_ids": [],
"metadata": {}
}
请求参数
Body 参数application/json
返回响应
修改于 2023-11-09 10:32:40