logo
On this page

SendAgentInstanceLLM

POST

https://aigc-aiagent-api.zegotech.cn/

This interface can be used to, as the user, actively call the LLM service, and based on the response content of the LLM, actively call the TTS service as the AI agent, and send voice messages to the user.Please refer to AI proactively speaking: proactive invocation of LLM and TTS for details and examples.

Request

Query Parameters

    Action stringrequired

    Possible values: [SendAgentInstanceLLM]

    API Prototype Parameter

    https://aigc-aiagent-api.zegotech.cn?Action=SendAgentInstanceLLM

    AppId uint32required

    💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.

    SignatureNonce stringrequired

    💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature sample code for how to generate.

    Timestamp int64required

    💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature sample code for how to generate, with a maximum error of 10 minutes.

    Signature stringrequired

    💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.

    SignatureVersion stringrequired

    Possible values: [2.0]

    Default value: 2.0

    💡Public parameter. Signature version number.

Body

required
    AgentInstanceId stringrequired

    The unique identifier of the AI agent instance, obtained through the response parameters of the Create AI Agent Instance interface.

    Text stringrequired

    The text content sent to the LLM service

    SystemPrompt string

    Whether to temporarily modify the system prompt of the AI agent for this conversation, if needed, fill in this field. If left blank, the system prompt of this conversation will not be changed.

    AddQuestionToHistory boolean

    Default value: false

    Whether to add the question to the context

    AddAnswerToHistory boolean

    Default value: false

    Whether to add the answer to the context

    Priority string

    Possible values: [Low, Medium, High]

    Default value: Medium

    Task priority, the default value is Medium.

    SamePriorityOption string

    Possible values: [ClearAndInterrupt, Enqueue]

    Default value: ClearAndInterrupt

    The interruption strategy when the same priority occurs, the default value is ClearAndInterrupt. Optional values:

    1. ClearAndInterrupt:Clear and interrupt
    2. Enqueue:Queue up to wait, the maximum number of queues is 5

Responses

Success
Schema
    Code integer

    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

Previous

Delete Agent Instance

Next

Trigger TTS

On this page

Back to top