AS AgentScopeAPI 手册 / API Reference

Builder

public static class Builder
源码Source io/agentscope/core/studio/StudioConfig.java:149–211

构建器,用于构建并配置目标实例。位于 io.agentscope.core.studio 包。核心成员包括 studioUrl、tracingUrl、project、runName、runId、maxRetries。

A class in io.agentscope.core.studio that evaluates agent behaviour and records tracing and telemetry data. Declared in io.agentscope.core.studio.

方法摘要Method Summary

方法Method说明Description
public Builder studioUrl(String studioUrl)
设置该配置项。
Performs the studio url operation.
public Builder tracingUrl(String tracingUrl)
设置追踪 URL。
Performs the tracing url operation.
public Builder project(String project)
设置该配置项。
Performs the project operation.
public Builder runName(String runName)
设置运行名称。
Runs the name.
public Builder runId(String runId)
设置运行标识。
Runs the id.
public Builder maxRetries(int maxRetries)
设置最大重试。
Performs the max retries operation.
public Builder reconnectAttempts(int reconnectAttempts)
设置重连尝试次数。
Performs the reconnect attempts operation.
public Builder reconnectDelay(Duration reconnectDelay)
设置重连延迟。
Performs the reconnect delay operation.
public Builder reconnectMaxDelay(Duration reconnectMaxDelay)
设置重连最大延迟。
Performs the reconnect max delay operation.
public StudioConfig build()
构建并返回最终实例。
Creates and returns an instance.

方法详情Method Detail

studioUrl

public Builder studioUrl(String studioUrl)

设置该配置项。

Performs the studio url operation.

参数Parameters
名称Name类型Type说明Description
studioUrlStringStudio URL(类型 `String`)。The studio url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:160–163

tracingUrl

public Builder tracingUrl(String tracingUrl)

设置追踪 URL。

Performs the tracing url operation.

参数Parameters
名称Name类型Type说明Description
tracingUrlString追踪 URL(类型 `String`)。The tracing url.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:165–168

project

public Builder project(String project)

设置该配置项。

Performs the project operation.

参数Parameters
名称Name类型Type说明Description
projectStringproject(类型 `String`)。The project.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:170–173

runName

public Builder runName(String runName)

设置运行名称。

Runs the name.

参数Parameters
名称Name类型Type说明Description
runNameString运行名称(类型 `String`)。The run name.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:175–178

runId

public Builder runId(String runId)

设置运行标识。

Runs the id.

参数Parameters
名称Name类型Type说明Description
runIdString运行标识(类型 `String`)。The run id.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:180–183

maxRetries

public Builder maxRetries(int maxRetries)

设置最大重试。

Performs the max retries operation.

参数Parameters
名称Name类型Type说明Description
maxRetriesint最大重试(类型 `int`)。The max retries.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:185–188

reconnectAttempts

public Builder reconnectAttempts(int reconnectAttempts)

设置重连尝试次数。

Performs the reconnect attempts operation.

参数Parameters
名称Name类型Type说明Description
reconnectAttemptsint重连尝试次数(类型 `int`)。The reconnect attempts.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:190–193

reconnectDelay

public Builder reconnectDelay(Duration reconnectDelay)

设置重连延迟。

Performs the reconnect delay operation.

参数Parameters
名称Name类型Type说明Description
reconnectDelayDuration重连延迟(类型 `Duration`)。The reconnect delay.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:195–198

reconnectMaxDelay

public Builder reconnectMaxDelay(Duration reconnectMaxDelay)

设置重连最大延迟。

Performs the reconnect max delay operation.

参数Parameters
名称Name类型Type说明Description
reconnectMaxDelayDuration重连最大延迟(类型 `Duration`)。The reconnect max delay.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/studio/StudioConfig.java:200–203

build

public StudioConfig build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns StudioConfig
返回StudioConfig。Returns studio config.
源码Source io/agentscope/core/studio/StudioConfig.java:205–210
基于官方固定版本源码静态生成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.