AS AgentScopeAPI 手册 / API Reference

DingTalkOutboundClient

public final class DingTalkOutboundClient
源码Source io/agentscope/extensions/channel/dingtalk/DingTalkOutboundClient.java:44–175

DingTalk 出站客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.channel.dingtalk 包。核心成员包括 send、DingTalkOutboundClient。

DingTalk outbound HTTP client. Wraps:

  • POST /v1.0/robot/oToMessages/batchSend for DMs (one-to-one with the bot)

  • POST /v1.0/robot/groupMessages/send for group chats

Both endpoints accept text or markdown via msgKey = sampleText / sampleMarkdown.

构造器摘要Constructor Summary

构造器Constructor说明Description
public DingTalkOutboundClient(String apiBase, DingTalkAccessTokenProvider tokenProvider, String robotCode)
初始化 `DingTalkOutboundClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<Void> send(OutboundAddress address, List<Msg> messages)
执行发送相关操作。
Sends each `msg` to the resolved peer (address format `"channelId:kind:peerId"`).

构造器详情Constructor Detail

DingTalkOutboundClient

public DingTalkOutboundClient(String apiBase, DingTalkAccessTokenProvider tokenProvider, String robotCode)

初始化 DingTalkOutboundClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
apiBaseStringAPI 基类(类型 `String`)。The api base.
tokenProviderDingTalkAccessTokenProvider令牌提供者(类型 `DingTalkAccessTokenProvider`)。The token provider.
robotCodeStringrobot Code(类型 `String`)。The robot code.
源码Source io/agentscope/extensions/channel/dingtalk/DingTalkOutboundClient.java:53–58

方法详情Method Detail

send

public Mono<Void> send(OutboundAddress address, List<Msg> messages)

执行发送相关操作。

Sends each msg to the resolved peer (address format "channelId:kind:peerId").

参数Parameters
名称Name类型Type说明Description
addressOutboundAddressaddress(类型 `OutboundAddress`)。The address.
messagesList<Msg>消息列表(类型 `List`)。The messages.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/extensions/channel/dingtalk/DingTalkOutboundClient.java:61–73
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.