logo
当前页

SendAgentInstanceLLM

POST

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

本接口可用于,以用户身份主动调用 LLM 服务,并基于 LLM 的响应内容,以智能体身份主动调用 TTS 服务,向用户发送语音消息。(1. 当调用此接口时,若会话中的智能体正在说话,则该智能体的说话进程会被打断;2. 调用本接口传入的文本信息不会记录在会话历史消息中,也不会通过 RTC 房间消息下发。但 LLM 生成的回复会被记录在会话历史消息中并且会通过 RTC 房间消息下发。)

Request

Query Parameters

    Action stringrequired

    Possible values: [SendAgentInstanceLLM]

    接口原型参数

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

    AppId uint32required

    AppId,ZEGO 分配的用户唯一凭证。

    SignatureNonce stringrequired

    随机字符串。

    Timestamp int64required

    Unix 时间戳,单位为秒。最多允许 10 分钟的误差。

    Signature stringrequired

    签名,用于验证请求的合法性。

    SignatureVersion stringrequired

    Possible values: [2.0]

    签名版本号,默认值为 2.0。

Body

required
    AgentInstanceId stringrequired

    智能体实例的唯一标识,通过 创建智能体实例 接口的响应参数获取。

    Text stringrequired

    发送给 LLM 服务的文本内容

    SystemPrompt string

    是否需要临时修改本次对话的智能体系统提示(prompt),若需要则填写本字段。若填空,则不改动本轮对话的 system prompt。

    AddQuestionToHistory boolean

    Default value: false

    是否把问题加入到上下文

    AddAnswerToHistory boolean

    Default value: false

    是否把回答加入到上下文

Responses

发送成功
Schema
    Code integer

    返回码,0 表示成功,其他值表示失败。详情请参考 返回码 说明。

    Message string

    请求结果说明

    RequestId string

    请求 ID


1
Copied!
Request
Collapse all
Base URL
https://aigc-aiagent-api.zegotech.cn
统一接入地址(不区分区域)
Parameters
queryrequired
queryrequired
queryrequired
queryrequired
queryrequired
queryrequired
Bodyrequired
{
"AgentInstanceId": "1907755175297171456",
"Text": "今天天气怎么样?",
"SystemPrompt": "你是一个友好的天气助手",
"AddQuestionToHistory": true,
"AddAnswerToHistory": true
}
RESPONSEClear

Click the "Send" button above and see the response here!

Previous

删除智能体实例

Next

主动调用 TTS

当前页

返回到顶部