Class AlibabaCloudServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<AlibabaCloudServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.AlibabaCloudServiceSettings.Builder
- All Implemented Interfaces:
WithJson<AlibabaCloudServiceSettings.Builder>,ObjectBuilder<AlibabaCloudServiceSettings>
- Enclosing class:
- AlibabaCloudServiceSettings
public static class AlibabaCloudServiceSettings.Builder
extends WithJsonObjectBuilderBase<AlibabaCloudServiceSettings.Builder>
implements ObjectBuilder<AlibabaCloudServiceSettings>
Builder for
AlibabaCloudServiceSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - A valid API key for the AlibabaCloud AI Search API.build()Builds aAlibabaCloudServiceSettings.Required - The name of the host address used for the inference task.rateLimit(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from AlibabaCloud AI Search.This setting helps to minimize the number of rate limit errors returned from AlibabaCloud AI Search.protected AlibabaCloudServiceSettings.Builderself()Required - The name of the model service to use for the inference task.Required - The name of the workspace used for the inference task.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKey
Required - A valid API key for the AlibabaCloud AI Search API.API name:
api_key -
host
Required - The name of the host address used for the inference task. You can find the host address in the API keys section of the documentation.API name:
host -
rateLimit
This setting helps to minimize the number of rate limit errors returned from AlibabaCloud AI Search. By default, thealibabacloud-ai-searchservice sets the number of requests allowed per minute to1000.API name:
rate_limit -
rateLimit
public final AlibabaCloudServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from AlibabaCloud AI Search. By default, thealibabacloud-ai-searchservice sets the number of requests allowed per minute to1000.API name:
rate_limit -
serviceId
Required - The name of the model service to use for the inference task. The following service IDs are available for thecompletiontask:ops-qwen-turboqwen-turboqwen-plusqwen-max รท qwen-max-longcontext
The following service ID is available for the
reranktask:ops-bge-reranker-larger
The following service ID is available for the
sparse_embeddingtask:ops-text-sparse-embedding-001
The following service IDs are available for the
text_embeddingtask:ops-text-embedding-001ops-text-embedding-zh-001ops-text-embedding-en-001ops-text-embedding-002API name:
service_id -
workspace
Required - The name of the workspace used for the inference task.API name:
workspace -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<AlibabaCloudServiceSettings.Builder>
-
build
Builds aAlibabaCloudServiceSettings.- Specified by:
buildin interfaceObjectBuilder<AlibabaCloudServiceSettings>- Throws:
NullPointerException- if some of the required fields are null.
-