E2bSandboxClientOptions
public class E2bSandboxClientOptions extends SandboxClientOptions
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 Detail
getType
public String getType()
获取类型。
Returns the type.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:72–75createClient
public SandboxClient<? extends SandboxClientOptions> createClient()
创建客户端。
Creates the client.
SandboxClient<? extends SandboxClientOptions>io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:77–80getHttpClient
public OkHttpClient getHttpClient()
获取HTTP 客户端。
Returns the http client.
OkHttpClientio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:82–84setHttpClient
public void setHttpClient(OkHttpClient httpClient)
设置HTTP 客户端。
Sets the http client.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
httpClient | OkHttpClient | HTTP 客户端(类型 `OkHttpClient`)。The http client. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:86–88getApiKey
public String getApiKey()
获取API 键。
Returns the api key.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:90–92setApiKey
public void setApiKey(String apiKey)
设置API 键。
Sets the api key.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiKey | String | API 键(类型 `String`)。The api key. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:94–96getApiBaseUrl
public String getApiBaseUrl()
获取API 基类 URL。
Returns the api base url.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:98–100setApiBaseUrl
public void setApiBaseUrl(String apiBaseUrl)
设置API 基类 URL。
Sets the api base url.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiBaseUrl | String | API 基类 URL(类型 `String`)。The api base url. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:102–104getDomain
public String getDomain()
获取 getDomain。
Returns the domain.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:106–108setDomain
public void setDomain(String domain)
设置 setDomain。
Sets the domain.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
domain | String | domain(类型 `String`)。The domain. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:110–112getTemplateId
public String getTemplateId()
获取模板标识。
Returns the template id.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:114–116setTemplateId
public void setTemplateId(String templateId)
设置模板标识。
Sets the template id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
templateId | String | 模板标识(类型 `String`)。The template id. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:118–120getWorkspaceRoot
public String getWorkspaceRoot()
获取工作区根。
Returns the workspace root.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:122–124setWorkspaceRoot
public void setWorkspaceRoot(String workspaceRoot)
设置工作区根。
Sets the workspace root.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceRoot | String | 工作区根(类型 `String`)。The workspace root. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:126–128getSandboxTimeoutSeconds
public int getSandboxTimeoutSeconds()
获取沙箱超时秒。
Returns the sandbox timeout seconds.
intio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:130–132setSandboxTimeoutSeconds
public void setSandboxTimeoutSeconds(int sandboxTimeoutSeconds)
设置沙箱超时秒。
Sets the sandbox timeout seconds.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandboxTimeoutSeconds | int | 沙箱超时秒(类型 `int`)。The sandbox timeout seconds. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:134–136getRunUser
public String getRunUser()
获取运行用户。
Returns the run user.
Stringio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:138–140setRunUser
public void setRunUser(String runUser)
设置运行用户。
Sets the run user.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runUser | String | 运行用户(类型 `String`)。The run user. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:142–144getPersistenceMode
public E2bPersistenceMode getPersistenceMode()
获取持久化模式。
Returns the persistence mode.
E2bPersistenceModeio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:146–148setPersistenceMode
public void setPersistenceMode(E2bPersistenceMode persistenceMode)
设置持久化模式。
Sets the persistence mode.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
persistenceMode | E2bPersistenceMode | 持久化模式(类型 `E2bPersistenceMode`)。The persistence mode. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:150–152getCodec
public E2bCodec getCodec()
获取编解码器。
Returns the codec.
E2bCodecio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:154–156setCodec
public void setCodec(E2bCodec codec)
设置编解码器。
Sets the codec.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
codec | E2bCodec | 编解码器(类型 `E2bCodec`)。The codec. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:158–160getConnectTimeoutSeconds
public int getConnectTimeoutSeconds()
获取连接超时秒。
Returns the connect timeout seconds.
intio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:162–164setConnectTimeoutSeconds
public void setConnectTimeoutSeconds(int connectTimeoutSeconds)
设置连接超时秒。
Sets the connect timeout seconds.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
connectTimeoutSeconds | int | 连接超时秒(类型 `int`)。The connect timeout seconds. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:166–168getReadTimeoutSeconds
public int getReadTimeoutSeconds()
获取读取超时秒。
Returns the read timeout seconds.
intio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:170–172setReadTimeoutSeconds
public void setReadTimeoutSeconds(int readTimeoutSeconds)
设置读取超时秒。
Sets the read timeout seconds.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
readTimeoutSeconds | int | 读取超时秒(类型 `int`)。The read timeout seconds. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:174–176getMaxRetries
public int getMaxRetries()
获取最大重试。
Returns the max retries.
intio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:178–180setMaxRetries
public void setMaxRetries(int maxRetries)
设置最大重试。
Sets the max retries.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxRetries | int | 最大重试(类型 `int`)。The max retries. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:182–184getSnapshotRetention
public int getSnapshotRetention()
获取 getSnapshotRetention。
Returns the snapshot retention.
intio/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:186–188setSnapshotRetention
public void setSnapshotRetention(int snapshotRetention)
设置 setSnapshotRetention。
Sets the snapshot retention.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
snapshotRetention | int | 快照 Retention(类型 `int`)。The snapshot retention. |
io/agentscope/extensions/sandbox/e2b/E2bSandboxClientOptions.java:190–192