WeComOutboundClient
public final class WeComOutboundClient
源码Source
io/agentscope/extensions/channel/wecom/WeComOutboundClient.java:41–202WeCom 出站客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.channel.wecom 包。核心成员包括 send、WeComOutboundClient。
WeCom outbound HTTP client. Wraps /cgi-bin/message/send (DM) and
/cgi-bin/appchat/send (app group chat). The first text
content (Msg#getTextContent()) of each Msg is sent.
For text content that contains markdown control characters we send msgtype=markdown;
otherwise plain text. (Heuristic only — callers that explicitly want markdown should already use
markdown syntax in their content.)
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public WeComOutboundClient(String apiBase, WeComAccessTokenProvider tokenProvider, int agentId) | 初始化 `WeComOutboundClient` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<Void> send(OutboundAddress address, List<Msg> messages) | 执行发送相关操作。 Sends each `msg` to the resolved peer. |
构造器详情Constructor Detail
WeComOutboundClient
public WeComOutboundClient(String apiBase, WeComAccessTokenProvider tokenProvider, int agentId)
初始化 WeComOutboundClient 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiBase | String | API 基类(类型 `String`)。The api base. |
tokenProvider | WeComAccessTokenProvider | 令牌提供者(类型 `WeComAccessTokenProvider`)。The token provider. |
agentId | int | 智能体标识(类型 `int`)。The agent id. |
源码Source
io/agentscope/extensions/channel/wecom/WeComOutboundClient.java:51–56方法详情Method Detail
send
public Mono<Void> send(OutboundAddress address, List<Msg> messages)
执行发送相关操作。
Sends each msg to the resolved peer.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
address | OutboundAddress | address(类型 `OutboundAddress`)。The address. |
messages | List<Msg> | 消息列表(类型 `List`)。The messages. |
Mono<Void>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/channel/wecom/WeComOutboundClient.java:63–75