Builder
public static class Builder
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:78–127构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.sandbox.manager 包。核心成员包括 containerPrefixKey、portRange、clientStarter、sandboxMap、baseUrl、bearerToken。
A class in io.agentscope.runtime.sandbox.manager that deploys, schedules and serves agents. Declared in io.agentscope.runtime.sandbox.manager.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder containerPrefixKey(String containerPrefixKey) | 设置该配置项。 Performs the container prefix key operation. |
public Builder portRange(PortRange portRange) | 设置该配置项。 Performs the port range operation. |
public Builder clientStarter(BaseClientStarter clientStarter) | 设置客户端启动器。 Performs the client starter operation. |
public Builder sandboxMap(SandboxMap sandboxMap) | 设置沙箱映射。 Performs the sandbox map operation. |
public Builder baseUrl(String baseUrl) | 设置基类 URL。 Performs the base url operation. |
public Builder bearerToken(String bearerToken) | 设置该配置项。 Performs the bearer token operation. |
public Builder agentBayApiKey(String agentBayApiKey) | 设置该配置项。 Performs the agent bay api key operation. |
public ManagerConfig build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
containerPrefixKey
public Builder containerPrefixKey(String containerPrefixKey)
设置该配置项。
Performs the container prefix key operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
containerPrefixKey | String | 容器 Prefix 键(类型 `String`)。The container prefix key. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:89–92portRange
public Builder portRange(PortRange portRange)
设置该配置项。
Performs the port range operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
portRange | PortRange | port Range(类型 `PortRange`)。The port range. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:94–97clientStarter
public Builder clientStarter(BaseClientStarter clientStarter)
设置客户端启动器。
Performs the client starter operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
clientStarter | BaseClientStarter | 客户端启动器(类型 `BaseClientStarter`)。The client starter. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:99–102sandboxMap
public Builder sandboxMap(SandboxMap sandboxMap)
设置沙箱映射。
Performs the sandbox map operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxMap | SandboxMap | 沙箱映射(类型 `SandboxMap`)。The sandbox map. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:104–107baseUrl
public Builder baseUrl(String baseUrl)
设置基类 URL。
Performs the base url operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseUrl | String | 基类 URL(类型 `String`)。The base url. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:109–112bearerToken
public Builder bearerToken(String bearerToken)
设置该配置项。
Performs the bearer token operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
bearerToken | String | bearer 令牌(类型 `String`)。The bearer token. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:114–117agentBayApiKey
public Builder agentBayApiKey(String agentBayApiKey)
设置该配置项。
Performs the agent bay api key operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentBayApiKey | String | 智能体 Bay API 键(类型 `String`)。The agent bay api key. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:119–122build
public ManagerConfig build()
构建并返回最终实例。
Creates and returns an instance.
ManagerConfig返回ManagerConfig。Returns manager config.
源码Source
io/agentscope/runtime/sandbox/manager/ManagerConfig.java:124–126