code_interpreter
、retrieval
、 或function
。{
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
"name": "apifox1"
"tools": [{"type": "code_interpreter"}],
"model": "gpt-4"
}
curl --location --request POST 'https://aimhub.nanjiren.online/v1/assistants' \
--header 'Authorization: Bearer ' \
--header 'Authorization;' \
--header 'OpenAI-Beta: assistants=v1' \
--header 'Accept;' \
--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": "apifox1"
"tools": [{"type": "code_interpreter"}],
"model": "gpt-4"
}'
{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1698984975,
"name": "Math Tutor",
"description": null,
"model": "gpt-4-1106-preview",
"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": {}
}