AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:163–238

构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.sandbox.manager.model 包。核心成员包括 containerPrefixKey、storageFolder、redisConfig、bearerToken、baseUrl、containerDeployment。

A class in io.agentscope.runtime.sandbox.manager.model that talks to model services and returns generated or embedded output. Declared in io.agentscope.runtime.sandbox.manager.model.

方法摘要Method Summary

方法Method说明Description
public Builder containerPrefixKey(String containerPrefixKey)
设置该配置项。
Performs the container prefix key operation.
public Builder storageFolder(String storageFolder)
设置该配置项。
Performs the storage folder operation.
public Builder redisConfig(RedisManagerConfig redisConfig)
设置该配置项。
Performs the redis config operation.
public Builder bearerToken(String bearerToken)
设置该配置项。
Performs the bearer token operation.
public Builder baseUrl(String baseUrl)
设置基类 URL。
Performs the base url operation.
public Builder containerDeployment(BaseClientConfig clientConfig)
设置容器部署。
Performs the container deployment operation.
public Builder portRange(PortRange portRange)
设置该配置项。
Performs the port range operation.
public Builder poolSize(int poolSize)
设置连接池大小。
Performs the pool size operation.
public Builder fileSystemConfig(FileSystemConfig fileSystemConfig)
设置文件系统配置。
Performs the file system config operation.
public Builder defaultSandboxType(List<SandboxType> defaultSandboxType)
设置默认沙箱类型。
Performs the default sandbox type 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
containerPrefixKeyString容器 Prefix 键(类型 `String`)。The container prefix key.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:177–183

storageFolder

public Builder storageFolder(String storageFolder)

设置该配置项。

Performs the storage folder operation.

参数Parameters
名称Name类型Type说明Description
storageFolderString存储 Folder(类型 `String`)。The storage folder.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:185–187

redisConfig

public Builder redisConfig(RedisManagerConfig redisConfig)

设置该配置项。

Performs the redis config operation.

参数Parameters
名称Name类型Type说明Description
redisConfigRedisManagerConfigRedis 配置(类型 `RedisManagerConfig`)。The redis config.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:189–193

bearerToken

public Builder bearerToken(String bearerToken)

设置该配置项。

Performs the bearer token operation.

参数Parameters
名称Name类型Type说明Description
bearerTokenStringbearer 令牌(类型 `String`)。The bearer token.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:195–198

baseUrl

public Builder baseUrl(String baseUrl)

设置基类 URL。

Performs the base url operation.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL(类型 `String`)。The base url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:200–203

containerDeployment

public Builder containerDeployment(BaseClientConfig clientConfig)

设置容器部署。

Performs the container deployment operation.

参数Parameters
名称Name类型Type说明Description
clientConfigBaseClientConfig客户端配置(类型 `BaseClientConfig`)。The client config.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:205–208

portRange

public Builder portRange(PortRange portRange)

设置该配置项。

Performs the port range operation.

参数Parameters
名称Name类型Type说明Description
portRangePortRangeport Range(类型 `PortRange`)。The port range.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:210–213

poolSize

public Builder poolSize(int poolSize)

设置连接池大小。

Performs the pool size operation.

参数Parameters
名称Name类型Type说明Description
poolSizeint连接池大小(类型 `int`)。The pool size.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:215–218

fileSystemConfig

public Builder fileSystemConfig(FileSystemConfig fileSystemConfig)

设置文件系统配置。

Performs the file system config operation.

参数Parameters
名称Name类型Type说明Description
fileSystemConfigFileSystemConfig文件系统配置(类型 `FileSystemConfig`)。The file system config.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:220–223

defaultSandboxType

public Builder defaultSandboxType(List<SandboxType> defaultSandboxType)

设置默认沙箱类型。

Performs the default sandbox type operation.

参数Parameters
名称Name类型Type说明Description
defaultSandboxTypeList<SandboxType>默认沙箱类型(类型 `List`)。The default sandbox type.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:225–228

agentBayApiKey

public Builder agentBayApiKey(String agentBayApiKey)

设置该配置项。

Performs the agent bay api key operation.

参数Parameters
名称Name类型Type说明Description
agentBayApiKeyString智能体 Bay API 键(类型 `String`)。The agent bay api key.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:230–233

build

public ManagerConfig build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns ManagerConfig
返回ManagerConfig。Returns manager config.
源码Source io/agentscope/runtime/sandbox/manager/model/ManagerConfig.java:235–237
基于官方固定版本源码静态生成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.