DingRtmAgentClient

通过阅读本文,您可以了解到Windows SDKDingRtmAgentClient接口详情。

接口说明

目录

RTM智能体服务接口。

API

描述

支持的最低版本

SetListener

设置智能体消息服务的回调。

3.9.0

SendGreetingReady

发送greetingready消息。

3.9.0

SendInterrupt

发送interrupt消息。

3.9.0

SendPushToTalk

发送对讲机模式命令。

3.9.0

接口详情

  • SetListener:设置智能体消息服务的回调。

    void SetListener (RtmAgentEventListener *listener)=0

    参数

    类型

    描述

    listener

    RtmAgentEventListener *

    用于接收来自RTM智能体服务的回调事件。

    重要

    需要在入会前设置监听,否则可能丢失部分RTM智能体事件回调。

  • SendGreetingReady:发送greetingready消息。

    int SendGreetingReady (const String &sessionId, const String &agentId)=0

    参数

    类型

    描述

    sessionId

    const ding::rtc::String &

    SessionID。

    agentId

    const ding::rtc::String &

    智能体用户ID。

    返回说明

    RtmErrorCode0:成功;<0:失败。

    重要

    需要在OnAgentSessionReady后调用。

  • SendInterrupt:发送interrupt消息。

    int SendInterrupt (const String &sessionId, const String &agentId)=0

    参数

    类型

    描述

    sessionId

    const ding::rtc::String &

    SessionID。

    agentId

    const ding::rtc::String &

    智能体用户ID。

    返回说明

    RtmErrorCode0:成功;<0:失败。

    重要

    需要在OnAgentSessionReady后调用。仅支持在自然对话模式下调用。

  • SendPushToTalk:发送对讲机模式命令。

    int SendPushToTalk (const String &sessionId, const String &agentId, AgentPushToTalkCmd cmd)=0

    参数

    类型

    描述

    sessionId

    const ding::rtc::String &

    SessionID。

    agentId

    const ding::rtc::String &

    智能体用户ID。

    cmd

    AgentPushToTalkCmd

    对讲机模式命令。

    返回说明

    RtmErrorCode0:成功;<0:失败。

    重要

    需要在OnAgentSessionReady后调用。仅支持在对讲机对话模式下调用。