Skip to main content
Assistants

更新智能体

更新指定智能体的属性。

POST
/assistants/{assistant_id}
cURL
curl --request POST \
  --url 'https://dashscope.aliyuncs.com/api/v1/assistants/{assistant_id}' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "instructions": "你是一个搜索助手",
  "name": "新建应用-assistantAPI",
  "description": "",
  "model": "qwen-max"
}
'
{
  "id": "asst_0678aa33-43e2-4268-95e6-b0010f9f7937",
  "object": "assistant",
  "created_at": 1711435564909,
  "model": "qwen-max",
  "name": "新建应用-assistantAPI",
  "description": "",
  "instructions": "你是一个搜索助手",
  "tools": [
    {
      "type": "search"
    },
    {
      "type": "text_to_image"
    },
    {
      "type": "code_interpreter"
    }
  ],
  "metadata": {},
  "request_id": "b0993831-a98b-9e71-b235-75174df9046e"
}

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。

Path Parameters

string
required

待更新的智能体 ID。

Body

application/json
string
required

智能体所使用的大模型 ID。

string

智能体使用的名字。

string

用于描述智能体的文字。

string

System prompt,用于智能体里的大模型。

object[]

一个可以被智能体调用的 tools 列表,需要在阿里云百炼中注册。

object

其他相关参数,用于存储智能体的附加信息。

Response

200-application/json
Managed Agent API
Flow Agent API
RAG API
Connector API
框架集成
  • 框架