Builder
public static class Builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:819–933DashScopeHttpClient的构建器。位于 io.agentscope.extensions.model.dashscope 包。核心成员包括 transport、apiKey、baseUrl、publicKeyId、publicKey、multimodalModelPatterns。
Builder for DashScopeHttpClient.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder transport(HttpTransport transport) | 设置HTTP 传输层。 Set the HTTP transport. |
public Builder apiKey(String apiKey) | 设置API 密钥。 Set the API key. |
public Builder baseUrl(String baseUrl) | 设置基类 URL。 Set the base URL. |
public Builder publicKeyId(String publicKeyId) | 设置该配置项。 Set the RSA public key ID for encryption. |
public Builder publicKey(String publicKey) | 设置该配置项。 Set the RSA public key for encryption (Base64-encoded). |
public Builder multimodalModelPatterns(Collection<String> userMultimodalPatterns) | 设置该配置项。 Set additional case-insensitive substring patterns for multimodal model detection. |
public DashScopeHttpClient build() | 构建DashScopeHttpClient。 Build the DashScopeHttpClient. |
方法详情Method Detail
transport
public Builder transport(HttpTransport transport)
设置HTTP 传输层。
Set the HTTP transport.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transport | HttpTransport | 传输层到使用。the transport to use |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:833–836apiKey
public Builder apiKey(String apiKey)
设置API 密钥。
Set the API key.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
apiKey | String | DashScope API 密钥。the DashScope API key |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:844–847baseUrl
public Builder baseUrl(String baseUrl)
设置基类 URL。
Set the base URL.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
baseUrl | String | 基类 URL(类型 `String`)。the base URL (null for default) |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:855–858publicKeyId
public Builder publicKeyId(String publicKeyId)
设置该配置项。
Set the RSA public key ID for encryption.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
publicKeyId | String | public 键标识(类型 `String`)。the public key ID (null to disable encryption) |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:869–872publicKey
public Builder publicKey(String publicKey)
设置该配置项。
Set the RSA public key for encryption (Base64-encoded).
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
publicKey | String | public 键(类型 `String`)。the Base64-encoded RSA public key (null to disable encryption) |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:883–886multimodalModelPatterns
public Builder multimodalModelPatterns(Collection<String> userMultimodalPatterns)
设置该配置项。
Set additional case-insensitive substring patterns for multimodal model detection.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userMultimodalPatterns | Collection<String> | 用户多模态 Patterns(类型 `Collection`)。case-insensitive substring patterns (may be null) |
Builder返回当前实例,以支持链式调用。this builder
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:909–912build
public DashScopeHttpClient build()
构建DashScopeHttpClient。
Build the DashScopeHttpClient.
DashScopeHttpClient一种新的DashScopeHttpClient 实例。a new DashScopeHttpClient instance
源码Source
io/agentscope/extensions/model/dashscope/DashScopeHttpClient.java:923–932