AS AgentScopeAPI 手册 / API Reference

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
defaultAgentIdString默认智能体标识(类型 `String`)。The default agent id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:72–75

dmScope

public Builder dmScope(DmScope dmScope)

设置dm 范围。

Performs the dm scope operation.

参数Parameters
名称Name类型Type说明Description
dmScopeDmScopedm 范围(类型 `DmScope`)。The dm scope.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:77–80

binding

public Builder binding(ChannelBinding binding)

设置绑定。

Performs the binding operation.

参数Parameters
名称Name类型Type说明Description
bindingChannelBinding绑定(类型 `ChannelBinding`)。The binding.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:82–85

bindings

public Builder bindings(List<ChannelBinding> bindings)

设置该配置项。

Performs the bindings operation.

参数Parameters
名称Name类型Type说明Description
bindingsList<ChannelBinding>bindings(类型 `List`)。The bindings.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:87–92

build

public ChannelConfig build()

构建并返回最终实例。

Creates and returns an instance.

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