Builder
public static final class Builder
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:62–97构建器,用于构建并配置目标实例。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 defaultAgentId、dmScope、binding、bindings、build。
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 defaultAgentId(String defaultAgentId) | 设置默认智能体标识。 Performs the default agent id operation. |
public Builder dmScope(DmScope dmScope) | 设置dm 范围。 Performs the dm scope operation. |
public Builder binding(ChannelBinding binding) | 设置绑定。 Performs the binding operation. |
public Builder bindings(List<ChannelBinding> bindings) | 设置该配置项。 Performs the bindings operation. |
public ChannelConfig build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
defaultAgentId
public Builder defaultAgentId(String defaultAgentId)
设置默认智能体标识。
Performs the default agent id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
defaultAgentId | String | 默认智能体标识(类型 `String`)。The default agent id. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:72–75dmScope
public Builder dmScope(DmScope dmScope)
设置dm 范围。
Performs the dm scope operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
dmScope | DmScope | dm 范围(类型 `DmScope`)。The dm scope. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:77–80binding
public Builder binding(ChannelBinding binding)
设置绑定。
Performs the binding operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
binding | ChannelBinding | 绑定(类型 `ChannelBinding`)。The binding. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:82–85bindings
public Builder bindings(List<ChannelBinding> bindings)
设置该配置项。
Performs the bindings operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
bindings | List<ChannelBinding> | bindings(类型 `List`)。The bindings. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:87–92build
public ChannelConfig build()
构建并返回最终实例。
Creates and returns an instance.
ChannelConfig返回ChannelConfig。Returns channel config.
源码Source
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:94–96