Package com.alibaba.dashscope.config
Class ResolvedConfig
java.lang.Object
com.alibaba.dashscope.config.ResolvedConfig
Fully-resolved client configuration, produced once per client by
ConfigResolver.-
Method Summary
Modifier and TypeMethodDescriptionResolved API key; may be null (failure surfaces at request time as SdkException).HTTP service root, e.g.okhttp3.OkHttpClientExternally injected OkHttpClient; null means the SDK builds and owns one.intConnection-pool cap on idle keep-alive connections.intintDispatcher cap on concurrent requests per host.intNetwork logging level (2.x parity): one of NONE / BASIC / HEADERS / BODY, resolved from DASHSCOPE_NETWORK_LOGGING_LEVEL; invalid values fall back to NONE.Single-request timeout (design §3: one of the three timeout semantics).WebSocket service root, e.g.WebSocket ping interval (audio design §12#1).booleantrue (default): failures raise DashScopeException; false: 2.x-style isError() returns.
-
Method Details
-
getApiKey
Resolved API key; may be null (failure surfaces at request time as SdkException). -
getBaseUrl
HTTP service root, e.g.https://dashscope.aliyuncs.com/api/v1. -
getWsBaseUrl
WebSocket service root, e.g.wss://dashscope.aliyuncs.com/api-ws/v1/inference. -
getWorkspace
-
getRegion
-
getTimeout
Single-request timeout (design §3: one of the three timeout semantics). -
getMaxRetries
public int getMaxRetries() -
isRaiseOnError
public boolean isRaiseOnError()true (default): failures raise DashScopeException; false: 2.x-style isError() returns. -
getHttpClient
public okhttp3.OkHttpClient getHttpClient()Externally injected OkHttpClient; null means the SDK builds and owns one. -
getMaxRequests
public int getMaxRequests() -
getMaxRequestsPerHost
public int getMaxRequestsPerHost()Dispatcher cap on concurrent requests per host. -
getMaxIdleConnections
public int getMaxIdleConnections()Connection-pool cap on idle keep-alive connections. -
getKeepAlive
-
getWsPingInterval
WebSocket ping interval (audio design §12#1).Duration.ZERO= 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. -
getNetworkLoggingLevel
Network logging level (2.x parity): one of NONE / BASIC / HEADERS / BODY, resolved from DASHSCOPE_NETWORK_LOGGING_LEVEL; invalid values fall back to NONE.
-