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 |
|---|---|---|
accountId | String | account 标识(类型 `String`)。The account id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:215–218senderId
public Builder senderId(String senderId)
设置该配置项。
Performs the sender id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
senderId | String | sender 标识(类型 `String`)。The sender id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:220–223parentPeer
public Builder parentPeer(Peer parentPeer)
设置父级对端。
Performs the parent peer operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parentPeer | Peer | 父级对端(类型 `Peer`)。The parent peer. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:225–228guild
public Builder guild(String guild)
设置该配置项。
Performs the guild operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
guild | String | guild(类型 `String`)。The guild. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:230–233team
public Builder team(String team)
设置团队。
Performs the team operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
team | String | 团队(类型 `String`)。The team. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:235–238roles
public Builder roles(Set<String> roles)
设置该配置项。
Performs the roles operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
roles | Set<String> | roles(类型 `Set`)。The roles. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:240–243preferredAgentId
public Builder preferredAgentId(String preferredAgentId)
设置该配置项。
Performs the preferred agent id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
preferredAgentId | String | preferred 智能体标识(类型 `String`)。The preferred agent id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:245–248runtimeContext
public Builder runtimeContext(RuntimeContext runtimeContext)
设置运行时上下文。
Performs the runtime context operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runtimeContext | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。The runtime context. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:250–253build
public InboundMessage build()
构建并返回最终实例。
Creates and returns an instance.
InboundMessage返回InboundMessage。Returns inbound message.
源码Source
io/agentscope/harness/agent/gateway/channel/InboundMessage.java:255–268