ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 授权机制 [授权机制](授权机制) ## 助理接口 #### 发布最新助理 **Request** ``` POST /agents/{agentId}/publish ``` **Path parameters** | Parameters | | | -------- | -------- | | agentId | Agent ID | **Request body** ``` EMPTY ``` **Response body** ``` EMPTY ``` #### 获取助理列表 **Request** ``` GET /agents ``` **Url parameters** | Parameters | | | -------- | -------- | | page | 页码,从0开始,default: 0 | | size | 每页记录数, default: 20 | **Request body** ``` EMPTY ``` **Response body** ``` { "content": [ object(Agent) ] "pagination": { "totalElements": number, "page": number, "size": number } } ``` > resource <a href = "#Agent">Agent</a> #### 获取助理信息 **Request** ``` GET /agents/{agentId} ``` **Path parameters** | Parameters | | | -------- | -------- | | agentId | Agent ID | **Request body** ``` EMPTY ``` **Response body** > object( <a href = "#Agent">Agent</a>) #### 创建助理 **Request** ``` POST /agents ``` **Request body** > object( <a href = "#AgentInput">AgentInput</a>) **Response body** > object( <a href = "#Agent">Agent</a>) #### 修改助理信息 **Request** ``` POST /agents/{agentId} ``` **Path parameters** | Parameters | | | -------- | -------- | | agentId | Agent ID | **Request body** > object( <a href = "#AgentInput">AgentInput</a>) **Response body** > object( <a href = "#Agent">Agent</a>) #### 删除助理 **Request** ``` DELETE /agents/{agentId} ``` **Path parameters** | Parameters | | | -------- | -------- | | agentId | Agent ID | Request body ``` EMPTY ``` Response body ``` EMPTY ``` ## Resource ### <a name="Agent">Agent</a> ```json { "id": string, "name": string, "description": string, "appKey": string, "serviceCategory": string, "skillIds": [string], "attributes": { "nickNames": [string], "nickNameTail": object(AttributeTail), "nickNameVoiceVariants": [string], "gender": enum(Gender), "genderTail": object(AttributeTail), "birthday": string(yyyy-MM-dd), "birthdayTail": object(AttributeTail), "hobbies": [string], "hobbiesTail": object(AttributeTail), "father": string, "fatherTail": object(AttributeTail) }, "defaultResponses": [string] } ``` ### <a name="AgentInput">AgentInput</a> ```json { "name": string, "description": string, "serviceCategory": string, "skillIds": [string], "attributes": { "nickNames": [string], "nickNameTail": object(AttributeTail), "nickNameVoiceVariants": [string], "gender": enum(Gender), "genderTail": object(AttributeTail), "birthday": string(yyyy-MM-dd), "birthdayTail": object(AttributeTail), "hobbies": [string], "hobbiesTail": object(AttributeTail), "father": string, "fatherTail": object(AttributeTail) }, "defaultResponses": [string] } ``` ### <a name="AttributeTail">AttributeTail</a> ```json { "tails": [string], "enabled": boolean } ``` ### <a name="Gender">Gender</a> enums ``` 男 女 ```