Update An AI Agent
Description
By passing the AI agent ID and basic configuration to this API, you can update an existing AI agent.
Request prototype
- Request method: POST
- Request body format: JSON
- Request URL: https://aigc-aiagent-api.zegotech.cn?Action=UpdateAgent
- Transmission protocol: HTTPS
- QPS limit: 10 times/second
Request Parameters
Listed below are the parameters specific to this request and part of the common request parameters. For the complete list of common request parameters, see [Accessing Server APIs - Common request parameters](./../Accessing%20Server%20APIs.mdx#common-request-parameteAI s
Parameter | Type | Required | Description |
---|---|---|---|
AgentId | String | Yes | The unique identifier of a registered AI agent. |
Name | String | No | The name of the agent, which must not exceed 256 bytes in length. |
LLM | Object | No | Large language model parameters. For details, see Frequently Used Parameters - LLM. |
TTS | Object | No | Text-to-speech parameters. For details, see Frequently Used Parameters - TTS. |
ASR | Object | No | Automatic speech recognition parameters. For details, see Frequently Used Parameters - ASR. |
Note
Only the parameters passed into this API will take effect; parameters not passed in will not be updated.
Sample Request
-
Request URL:
Untitledhttps://aigc-aiagent-api.zegotech.cn?Action=UpdateAgent &<Common request parameters>
1 -
Request body:
Untitled{ "AgentId": "xiaozhi", "LLM": { "Url": "https://api.minimax.chat/v2/text/chatcompletion_v2", "ApiKey": "zego_test", // your api key "Model": "doubao-lite-32k-240828", "SystemPrompt": "You are Xiaozhi, an adult woman, a companion assistant **created by ZEGO**. knowledgeable in both astronomy and geography, intelligent, wise, enthusiastic, and friendly. \nDialogue requirements: 1. Dialogue with users according to the requirements of the persona. \n2.No more than 100 words." }, "TTS": { "Vendor": "Bytedance", "Params": { "app": { "appid": "zego_test", // your appid "token": "zego_test", // your token "cluster": "volcano_tts" }, "audio": { "voice_type": "en_female_sarah_mars_bigtts" // your voice type } } }, "ASR": {} }
1
Response Parameters
Parameter | Type | Description |
---|---|---|
Code | Number | Return code. 0 indicates success, other values indicate failure. For more information on error codes and response handling recommendations, please refer to Return Codes. |
Message | String | Explanation of the request result. |
RequestId | String | Request ID. |
Sample Response
Untitled
{
"Code": 0,
"Message": "Succeed",
"RequestId": "1843985617336143872"
}
1