cURL
Authorizations
string
header
required
DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。
Body
application/jsonResponse
200-application/json
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
创建一个新的智能体(Assistant)。
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/assistants' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen-max",
"name": "智能小助手",
"description": "这是一个智能小助手",
"instructions": "你是一个智能小助手,你可以根据用户的需求去调用不同的工具,进而给出回答。请酌情使用工具。",
"tools": [
{
"type": "code_interpreter"
}
],
"metadata": {}
}
'{
"id": "asst_49079f4b-d1e8-4015-a12e-2dcdd1f18d84",
"object": "assistant",
"created_at": 1711713885724,
"model": "qwen-max",
"name": "智能小助手",
"description": "这是一个智能小助手",
"instructions": "你是一个智能小助手,你可以根据用户的需求去调用不同的工具,进而给出回答。请酌情使用工具。",
"tools": [
{
"type": "code_interpreter"
}
],
"metadata": {},
"temperature": null,
"top_p": null,
"top_k": null,
"max_tokens": null,
"request_id": "b1778226-3865-9006-9e95-56329a710322"
}DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/assistants' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen-max",
"name": "智能小助手",
"description": "这是一个智能小助手",
"instructions": "你是一个智能小助手,你可以根据用户的需求去调用不同的工具,进而给出回答。请酌情使用工具。",
"tools": [
{
"type": "code_interpreter"
}
],
"metadata": {}
}
'{
"id": "asst_49079f4b-d1e8-4015-a12e-2dcdd1f18d84",
"object": "assistant",
"created_at": 1711713885724,
"model": "qwen-max",
"name": "智能小助手",
"description": "这是一个智能小助手",
"instructions": "你是一个智能小助手,你可以根据用户的需求去调用不同的工具,进而给出回答。请酌情使用工具。",
"tools": [
{
"type": "code_interpreter"
}
],
"metadata": {},
"temperature": null,
"top_p": null,
"top_k": null,
"max_tokens": null,
"request_id": "b1778226-3865-9006-9e95-56329a710322"
}