logo
On this page

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

ParameterTypeRequiredDescription
AgentIdStringYesThe unique identifier of a registered AI agent.
NameStringNoThe name of the agent, which must not exceed 256 bytes in length.
LLMObjectNoLarge language model parameters. For details, see Frequently Used Parameters - LLM.
TTSObjectNoText-to-speech parameters. For details, see Frequently Used Parameters - TTS.
ASRObjectNoAutomatic 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:

    Untitled
    https://aigc-aiagent-api.zegotech.cn?Action=UpdateAgent
    &<Common request parameters>
    
    1
    Copied!
  • 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
    Copied!

Response Parameters

ParameterTypeDescription
CodeNumberReturn code. 0 indicates success, other values indicate failure. For more information on error codes and response handling recommendations, please refer to Return Codes.
MessageStringExplanation of the request result.
RequestIdStringRequest ID.

Sample Response

Untitled
{
    "Code": 0,
    "Message": "Succeed",
    "RequestId": "1843985617336143872"
}
1
Copied!

Previous

Unregister Agent

Next

List Agents