Builder
public static class Builder
源码Source
io/agentscope/core/studio/StudioManager.java:128–269构建器,用于构建并配置目标实例。位于 io.agentscope.core.studio 包。核心成员包括 studioUrl、tracingUrl、project、runName、maxRetries、reconnectAttempts。
Builder for configuring and initializing Studio integration.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder studioUrl(String studioUrl) | 设置该配置项。 Sets the Studio URL. |
public Builder tracingUrl(String tracingUrl) | 设置追踪 URL。 Sets the tracing URL (defaults to {studioUrl}/v1/traces). |
public Builder project(String project) | 设置该配置项。 Sets the project name. |
public Builder runName(String runName) | 设置运行名称。 Sets the run name. |
public Builder maxRetries(int maxRetries) | 设置最大重试。 Sets the maximum number of HTTP request retries. |
public Builder reconnectAttempts(int reconnectAttempts) | 设置重连尝试次数。 Sets the number of WebSocket reconnection attempts. |
public Mono<Void> initialize() | 初始化 `Builder` 实例。 Initializes Studio integration. |
方法详情Method Detail
studioUrl
public Builder studioUrl(String studioUrl)
设置该配置项。
Sets the Studio URL.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
studioUrl | String | Studio URL(类型 `String`)。The Studio server URL (e.g., "http://localhost:8000") |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/studio/StudioManager.java:141–144tracingUrl
public Builder tracingUrl(String tracingUrl)
设置追踪 URL。
Sets the tracing URL (defaults to {studioUrl}/v1/traces).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tracingUrl | String | OpenTelemetry 追踪端点 URL。The OpenTelemetry tracing endpoint URL |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/studio/StudioManager.java:152–155project
public Builder project(String project)
设置该配置项。
Sets the project name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
project | String | project(类型 `String`)。The project name |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/studio/StudioManager.java:163–166runName
public Builder runName(String runName)
设置运行名称。
Sets the run name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runName | String | 运行名称。The run name |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/studio/StudioManager.java:174–177maxRetries
public Builder maxRetries(int maxRetries)
设置最大重试。
Sets the maximum number of HTTP request retries.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxRetries | int | 最大重试(类型 `int`)。Maximum retry count (default: 3) |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/studio/StudioManager.java:185–188reconnectAttempts
public Builder reconnectAttempts(int reconnectAttempts)
设置重连尝试次数。
Sets the number of WebSocket reconnection attempts.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
reconnectAttempts | int | 重连尝试次数(类型 `int`)。Maximum reconnection attempts (default: 3) |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/studio/StudioManager.java:196–199initialize
public Mono<Void> initialize()
初始化 Builder 实例。
Initializes Studio integration.
Mono<Void>返回Mono。A Mono that completes when initialization succeeds
源码Source
io/agentscope/core/studio/StudioManager.java:214–268