AS AgentScopeAPI 手册 / API Reference

Builder

public static final class Builder
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:196–269

构建器,用于构建并配置目标实例。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 accountId、senderId、parentPeer、guild、team、roles。

A class in io.agentscope.harness.agent.gateway.channel that deploys, schedules and serves agents. Declared in io.agentscope.harness.agent.gateway.channel.

方法摘要Method Summary

方法Method说明Description
public Builder accountId(String accountId)
设置该配置项。
Performs the account id operation.
public Builder senderId(String senderId)
设置该配置项。
Performs the sender id operation.
public Builder parentPeer(Peer parentPeer)
设置父级对端。
Performs the parent peer operation.
public Builder guild(String guild)
设置该配置项。
Performs the guild operation.
public Builder team(String team)
设置团队。
Performs the team operation.
public Builder roles(Set<String> roles)
设置该配置项。
Performs the roles operation.
public Builder preferredAgentId(String preferredAgentId)
设置该配置项。
Performs the preferred agent id operation.
public Builder runtimeContext(RuntimeContext runtimeContext)
设置运行时上下文。
Performs the runtime context operation.
public InboundMessage build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

accountId

public Builder accountId(String accountId)

设置该配置项。

Performs the account id operation.

参数Parameters
名称Name类型Type说明Description
accountIdStringaccount 标识(类型 `String`)。The account id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:215–218

senderId

public Builder senderId(String senderId)

设置该配置项。

Performs the sender id operation.

参数Parameters
名称Name类型Type说明Description
senderIdStringsender 标识(类型 `String`)。The sender id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:220–223

parentPeer

public Builder parentPeer(Peer parentPeer)

设置父级对端。

Performs the parent peer operation.

参数Parameters
名称Name类型Type说明Description
parentPeerPeer父级对端(类型 `Peer`)。The parent peer.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:225–228

guild

public Builder guild(String guild)

设置该配置项。

Performs the guild operation.

参数Parameters
名称Name类型Type说明Description
guildStringguild(类型 `String`)。The guild.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:230–233

team

public Builder team(String team)

设置团队。

Performs the team operation.

参数Parameters
名称Name类型Type说明Description
teamString团队(类型 `String`)。The team.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:235–238

roles

public Builder roles(Set<String> roles)

设置该配置项。

Performs the roles operation.

参数Parameters
名称Name类型Type说明Description
rolesSet<String>roles(类型 `Set`)。The roles.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:240–243

preferredAgentId

public Builder preferredAgentId(String preferredAgentId)

设置该配置项。

Performs the preferred agent id operation.

参数Parameters
名称Name类型Type说明Description
preferredAgentIdStringpreferred 智能体标识(类型 `String`)。The preferred agent id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:245–248

runtimeContext

public Builder runtimeContext(RuntimeContext runtimeContext)

设置运行时上下文。

Performs the runtime context operation.

参数Parameters
名称Name类型Type说明Description
runtimeContextRuntimeContext运行时上下文(类型 `RuntimeContext`)。The runtime context.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:250–253

build

public InboundMessage build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns InboundMessage
返回InboundMessage。Returns inbound message.
源码Source io/agentscope/harness/agent/gateway/channel/InboundMessage.java:255–268
基于官方固定版本源码静态生成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.