AS AgentScopeAPI 手册 / API Reference

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
studioUrlStringStudio URL(类型 `String`)。The Studio server URL (e.g., "http://localhost:8000")
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/studio/StudioManager.java:141–144

tracingUrl

public Builder tracingUrl(String tracingUrl)

设置追踪 URL。

Sets the tracing URL (defaults to {studioUrl}/v1/traces).

参数Parameters
名称Name类型Type说明Description
tracingUrlStringOpenTelemetry 追踪端点 URL。The OpenTelemetry tracing endpoint URL
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/studio/StudioManager.java:152–155

project

public Builder project(String project)

设置该配置项。

Sets the project name.

参数Parameters
名称Name类型Type说明Description
projectStringproject(类型 `String`)。The project name
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/studio/StudioManager.java:163–166

runName

public Builder runName(String runName)

设置运行名称。

Sets the run name.

参数Parameters
名称Name类型Type说明Description
runNameString运行名称。The run name
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/studio/StudioManager.java:174–177

maxRetries

public Builder maxRetries(int maxRetries)

设置最大重试。

Sets the maximum number of HTTP request retries.

参数Parameters
名称Name类型Type说明Description
maxRetriesint最大重试(类型 `int`)。Maximum retry count (default: 3)
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/studio/StudioManager.java:185–188

reconnectAttempts

public Builder reconnectAttempts(int reconnectAttempts)

设置重连尝试次数。

Sets the number of WebSocket reconnection attempts.

参数Parameters
名称Name类型Type说明Description
reconnectAttemptsint重连尝试次数(类型 `int`)。Maximum reconnection attempts (default: 3)
返回Returns Builder
返回当前实例,以支持链式调用。This builder
源码Source io/agentscope/core/studio/StudioManager.java:196–199

initialize

public Mono<Void> initialize()

初始化 Builder 实例。

Initializes Studio integration.

返回Returns Mono<Void>
返回Mono。A Mono that completes when initialization succeeds
源码Source io/agentscope/core/studio/StudioManager.java:214–268
基于官方固定版本源码静态生成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.