AS AgentScopeAPI 手册 / API Reference

E2bSandboxClientOptions

public class E2bSandboxClientOptions extends SandboxClientOptions
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:23–193

用于E2bSandboxClient的选项。位于 io.agentscope.extensions.sandbox.e2b 包,继承自 SandboxClientOptions。核心成员包括 getType、createClient、getHttpClient、setHttpClient、getApiKey、setApiKey。

Options for E2bSandboxClient.

方法摘要Method Summary

方法Method说明Description
public String getType()
获取类型。
Returns the type.
public SandboxClient<? extends SandboxClientOptions> createClient()
创建客户端。
Creates the client.
public OkHttpClient getHttpClient()
获取HTTP 客户端。
Returns the http client.
public void setHttpClient(OkHttpClient httpClient)
设置HTTP 客户端。
Sets the http client.
public String getApiKey()
获取API 键。
Returns the api key.
public void setApiKey(String apiKey)
设置API 键。
Sets the api key.
public String getApiBaseUrl()
获取API 基类 URL。
Returns the api base url.
public void setApiBaseUrl(String apiBaseUrl)
设置API 基类 URL。
Sets the api base url.
public String getDomain()
获取 `getDomain`。
Returns the domain.
public void setDomain(String domain)
设置 `setDomain`。
Sets the domain.
public String getTemplateId()
获取模板标识。
Returns the template id.
public void setTemplateId(String templateId)
设置模板标识。
Sets the template id.
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
public int getSandboxTimeoutSeconds()
获取沙箱超时秒。
Returns the sandbox timeout seconds.
public void setSandboxTimeoutSeconds(int sandboxTimeoutSeconds)
设置沙箱超时秒。
Sets the sandbox timeout seconds.
public String getRunUser()
获取运行用户。
Returns the run user.
public void setRunUser(String runUser)
设置运行用户。
Sets the run user.
public E2bPersistenceMode getPersistenceMode()
获取持久化模式。
Returns the persistence mode.
public void setPersistenceMode(E2bPersistenceMode persistenceMode)
设置持久化模式。
Sets the persistence mode.
public E2bCodec getCodec()
获取编解码器。
Returns the codec.
public void setCodec(E2bCodec codec)
设置编解码器。
Sets the codec.
public int getConnectTimeoutSeconds()
获取连接超时秒。
Returns the connect timeout seconds.
public void setConnectTimeoutSeconds(int connectTimeoutSeconds)
设置连接超时秒。
Sets the connect timeout seconds.
public int getReadTimeoutSeconds()
获取读取超时秒。
Returns the read timeout seconds.
public void setReadTimeoutSeconds(int readTimeoutSeconds)
设置读取超时秒。
Sets the read timeout seconds.
public int getMaxRetries()
获取最大重试。
Returns the max retries.
public void setMaxRetries(int maxRetries)
设置最大重试。
Sets the max retries.
public int getSnapshotRetention()
获取 `getSnapshotRetention`。
Returns the snapshot retention.
public void setSnapshotRetention(int snapshotRetention)
设置 `setSnapshotRetention`。
Sets the snapshot retention.

方法详情Method Detail

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:72–75

createClient

public SandboxClient<? extends SandboxClientOptions> createClient()

创建客户端。

Creates the client.

返回Returns SandboxClient<? extends SandboxClientOptions>
返回SandboxClient。Returns sandbox client.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:77–80

getHttpClient

public OkHttpClient getHttpClient()

获取HTTP 客户端。

Returns the http client.

返回Returns OkHttpClient
返回OkHttpClient。Returns ok http client.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:82–84

setHttpClient

public void setHttpClient(OkHttpClient httpClient)

设置HTTP 客户端。

Sets the http client.

参数Parameters
名称Name类型Type说明Description
httpClientOkHttpClientHTTP 客户端(类型 `OkHttpClient`)。The http client.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:86–88

getApiKey

public String getApiKey()

获取API 键。

Returns the api key.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:90–92

setApiKey

public void setApiKey(String apiKey)

设置API 键。

Sets the api key.

参数Parameters
名称Name类型Type说明Description
apiKeyStringAPI 键(类型 `String`)。The api key.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:94–96

getApiBaseUrl

public String getApiBaseUrl()

获取API 基类 URL。

Returns the api base url.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:98–100

setApiBaseUrl

public void setApiBaseUrl(String apiBaseUrl)

设置API 基类 URL。

Sets the api base url.

参数Parameters
名称Name类型Type说明Description
apiBaseUrlStringAPI 基类 URL(类型 `String`)。The api base url.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:102–104

getDomain

public String getDomain()

获取 getDomain。

Returns the domain.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:106–108

setDomain

public void setDomain(String domain)

设置 setDomain。

Sets the domain.

参数Parameters
名称Name类型Type说明Description
domainStringdomain(类型 `String`)。The domain.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:110–112

getTemplateId

public String getTemplateId()

获取模板标识。

Returns the template id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:114–116

setTemplateId

public void setTemplateId(String templateId)

设置模板标识。

Sets the template id.

参数Parameters
名称Name类型Type说明Description
templateIdString模板标识(类型 `String`)。The template id.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:118–120

getWorkspaceRoot

public String getWorkspaceRoot()

获取工作区根。

Returns the workspace root.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:122–124

setWorkspaceRoot

public void setWorkspaceRoot(String workspaceRoot)

设置工作区根。

Sets the workspace root.

参数Parameters
名称Name类型Type说明Description
workspaceRootString工作区根(类型 `String`)。The workspace root.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:126–128

getSandboxTimeoutSeconds

public int getSandboxTimeoutSeconds()

获取沙箱超时秒。

Returns the sandbox timeout seconds.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:130–132

setSandboxTimeoutSeconds

public void setSandboxTimeoutSeconds(int sandboxTimeoutSeconds)

设置沙箱超时秒。

Sets the sandbox timeout seconds.

参数Parameters
名称Name类型Type说明Description
sandboxTimeoutSecondsint沙箱超时秒(类型 `int`)。The sandbox timeout seconds.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:134–136

getRunUser

public String getRunUser()

获取运行用户。

Returns the run user.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:138–140

setRunUser

public void setRunUser(String runUser)

设置运行用户。

Sets the run user.

参数Parameters
名称Name类型Type说明Description
runUserString运行用户(类型 `String`)。The run user.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:142–144

getPersistenceMode

public E2bPersistenceMode getPersistenceMode()

获取持久化模式。

Returns the persistence mode.

返回Returns E2bPersistenceMode
返回E2bPersistenceMode。Returns e 2 b persistence mode.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:146–148

setPersistenceMode

public void setPersistenceMode(E2bPersistenceMode persistenceMode)

设置持久化模式。

Sets the persistence mode.

参数Parameters
名称Name类型Type说明Description
persistenceModeE2bPersistenceMode持久化模式(类型 `E2bPersistenceMode`)。The persistence mode.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:150–152

getCodec

public E2bCodec getCodec()

获取编解码器。

Returns the codec.

返回Returns E2bCodec
返回E2bCodec。Returns e 2 b codec.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:154–156

setCodec

public void setCodec(E2bCodec codec)

设置编解码器。

Sets the codec.

参数Parameters
名称Name类型Type说明Description
codecE2bCodec编解码器(类型 `E2bCodec`)。The codec.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:158–160

getConnectTimeoutSeconds

public int getConnectTimeoutSeconds()

获取连接超时秒。

Returns the connect timeout seconds.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:162–164

setConnectTimeoutSeconds

public void setConnectTimeoutSeconds(int connectTimeoutSeconds)

设置连接超时秒。

Sets the connect timeout seconds.

参数Parameters
名称Name类型Type说明Description
connectTimeoutSecondsint连接超时秒(类型 `int`)。The connect timeout seconds.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:166–168

getReadTimeoutSeconds

public int getReadTimeoutSeconds()

获取读取超时秒。

Returns the read timeout seconds.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:170–172

setReadTimeoutSeconds

public void setReadTimeoutSeconds(int readTimeoutSeconds)

设置读取超时秒。

Sets the read timeout seconds.

参数Parameters
名称Name类型Type说明Description
readTimeoutSecondsint读取超时秒(类型 `int`)。The read timeout seconds.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:174–176

getMaxRetries

public int getMaxRetries()

获取最大重试。

Returns the max retries.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:178–180

setMaxRetries

public void setMaxRetries(int maxRetries)

设置最大重试。

Sets the max retries.

参数Parameters
名称Name类型Type说明Description
maxRetriesint最大重试(类型 `int`)。The max retries.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:182–184

getSnapshotRetention

public int getSnapshotRetention()

获取 getSnapshotRetention。

Returns the snapshot retention.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:186–188

setSnapshotRetention

public void setSnapshotRetention(int snapshotRetention)

设置 setSnapshotRetention。

Sets the snapshot retention.

参数Parameters
名称Name类型Type说明Description
snapshotRetentionint快照 Retention(类型 `int`)。The snapshot retention.
源码Source io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:190–192
基于官方固定版本源码静态生成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.