AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:215–304

构建器,用于构建并配置目标实例。位于 io.agentscope.runtime.sandbox.manager.model.container 包。核心成员包括 sessionId、containerId、containerName、baseUrl、browserUrl、frontBrowserWS。

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

方法摘要Method Summary

方法Method说明Description
public Builder sessionId(String sessionId)
设置会话标识。
Performs the session id operation.
public Builder containerId(String containerId)
设置容器标识。
Performs the container id operation.
public Builder containerName(String containerName)
设置容器名称。
Performs the container name operation.
public Builder baseUrl(String baseUrl)
设置基类 URL。
Performs the base url operation.
public Builder browserUrl(String browserUrl)
设置该配置项。
Performs the browser url operation.
public Builder frontBrowserWS(String frontBrowserWS)
设置该配置项。
Performs the front browser WS operation.
public Builder clientBrowserWS(String clientBrowserWS)
设置该配置项。
Performs the client browser WS operation.
public Builder artifactsSIO(String artifactsSIO)
设置该配置项。
Performs the artifacts SIO operation.
public Builder ports(String[] ports)
设置该配置项。
Performs the ports operation.
public Builder mountDir(String mountDir)
设置该配置项。
Performs the mount dir operation.
public Builder storagePath(String storagePath)
设置存储路径。
Performs the storage path operation.
public Builder runtimeToken(String runtimeToken)
设置运行时令牌。
Performs the runtime token operation.
public Builder version(String version)
设置版本。
Performs the version operation.
public Builder authToken(String authToken)
设置认证令牌。
Performs the auth token operation.
public ContainerModel build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

sessionId

public Builder sessionId(String sessionId)

设置会话标识。

Performs the session id operation.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:231–234

containerId

public Builder containerId(String containerId)

设置容器标识。

Performs the container id operation.

参数Parameters
名称Name类型Type说明Description
containerIdString容器标识(类型 `String`)。The container id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:236–239

containerName

public Builder containerName(String containerName)

设置容器名称。

Performs the container name operation.

参数Parameters
名称Name类型Type说明Description
containerNameString容器名称(类型 `String`)。The container name.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:241–244

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/container/ContainerModel.java:246–249

browserUrl

public Builder browserUrl(String browserUrl)

设置该配置项。

Performs the browser url operation.

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

frontBrowserWS

public Builder frontBrowserWS(String frontBrowserWS)

设置该配置项。

Performs the front browser WS operation.

参数Parameters
名称Name类型Type说明Description
frontBrowserWSStringfront Browser WS(类型 `String`)。The front browser WS.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:256–259

clientBrowserWS

public Builder clientBrowserWS(String clientBrowserWS)

设置该配置项。

Performs the client browser WS operation.

参数Parameters
名称Name类型Type说明Description
clientBrowserWSString客户端 Browser WS(类型 `String`)。The client browser WS.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:261–264

artifactsSIO

public Builder artifactsSIO(String artifactsSIO)

设置该配置项。

Performs the artifacts SIO operation.

参数Parameters
名称Name类型Type说明Description
artifactsSIOStringartifacts SIO(类型 `String`)。The artifacts SIO.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:266–269

ports

public Builder ports(String[] ports)

设置该配置项。

Performs the ports operation.

参数Parameters
名称Name类型Type说明Description
portsString[]ports(类型 `String[]`)。The ports.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:271–274

mountDir

public Builder mountDir(String mountDir)

设置该配置项。

Performs the mount dir operation.

参数Parameters
名称Name类型Type说明Description
mountDirStringmount 目录(类型 `String`)。The mount dir.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:276–279

storagePath

public Builder storagePath(String storagePath)

设置存储路径。

Performs the storage path operation.

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

runtimeToken

public Builder runtimeToken(String runtimeToken)

设置运行时令牌。

Performs the runtime token operation.

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

version

public Builder version(String version)

设置版本。

Performs the version operation.

参数Parameters
名称Name类型Type说明Description
versionString版本(类型 `String`)。The version.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/runtime/sandbox/manager/model/container/ContainerModel.java:291–294

authToken

public Builder authToken(String authToken)

设置认证令牌。

Performs the auth token operation.

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

build

public ContainerModel build()

构建并返回最终实例。

Creates and returns an instance.

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