类 DashScopeHttpClient.Builder
java.lang.Object
io.agentscope.core.model.DashScopeHttpClient.Builder
- 封闭类:
DashScopeHttpClient
Builder for DashScopeHttpClient.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Set the API key.Set the base URL.build()Build the DashScopeHttpClient.Set the RSA public key for encryption (Base64-encoded).publicKeyId(String publicKeyId) Set the RSA public key ID for encryption.transport(HttpTransport transport) Set the HTTP transport.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
transport
Set the HTTP transport.- 参数:
transport- the transport to use- 返回:
- this builder
-
apiKey
Set the API key.- 参数:
apiKey- the DashScope API key- 返回:
- this builder
-
baseUrl
Set the base URL.- 参数:
baseUrl- the base URL (null for default)- 返回:
- this builder
-
publicKeyId
Set the RSA public key ID for encryption.When both publicKeyId and publicKey are set, requests and responses will be encrypted using AES-GCM with RSA key exchange, following Aliyun's encryption protocol.
- 参数:
publicKeyId- the public key ID (null to disable encryption)- 返回:
- this builder
-
publicKey
Set the RSA public key for encryption (Base64-encoded).When both publicKeyId and publicKey are set, requests and responses will be encrypted using AES-GCM with RSA key exchange, following Aliyun's encryption protocol.
- 参数:
publicKey- the Base64-encoded RSA public key (null to disable encryption)- 返回:
- this builder
-
build
Build the DashScopeHttpClient.If no transport is specified, the default transport from
HttpTransportFactory.getDefault()will be used, which provides automatic lifecycle management and cleanup on JVM shutdown.- 返回:
- a new DashScopeHttpClient instance
-