Package com.alibaba.dashscope
Class ClientOptions
java.lang.Object
com.alibaba.dashscope.ClientOptions
Immutable client options (design §2). Every field is an explicit value: null means "fall
through the config chain" (builder > JVM system property > environment variable >
~/.dashscope/config.toml > default, see config/ConfigResolver).-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientOptions.Builderbuilder()Externally injected async executor; the caller owns its lifecycle.okhttp3.OkHttpClientExternally injected OkHttpClient; the caller then owns its lifecycle.Default true: failures raise exceptions; false: 2.x-styleisError()returns.Single-request timeout (design §3).WebSocket ping interval (audio design §12#1).
-
Method Details
-
builder
-
toBuilder
-
getApiKey
-
getBaseUrl
-
getWsBaseUrl
-
getWorkspace
-
getRegion
-
getTimeout
Single-request timeout (design §3). -
getMaxRetries
-
getRaiseOnError
Default true: failures raise exceptions; false: 2.x-styleisError()returns. -
getWsPingInterval
WebSocket ping interval (audio design §12#1). Default 0 = off (aligned with Python); behind NATs or proxies that silently drop idle connections, 20–30 s is recommended so half-open connections are detected instead of hanging forever. -
getHttpClient
public okhttp3.OkHttpClient getHttpClient()Externally injected OkHttpClient; the caller then owns its lifecycle. -
getExecutor
Externally injected async executor; the caller owns its lifecycle.
-