Class AmazonBedrockServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<AmazonBedrockServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.AmazonBedrockServiceSettings.Builder
- All Implemented Interfaces:
WithJson<AmazonBedrockServiceSettings.Builder>
,ObjectBuilder<AmazonBedrockServiceSettings>
- Enclosing class:
- AmazonBedrockServiceSettings
public static class AmazonBedrockServiceSettings.Builder
extends WithJsonObjectBuilderBase<AmazonBedrockServiceSettings.Builder>
implements ObjectBuilder<AmazonBedrockServiceSettings>
Builder for
AmazonBedrockServiceSettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - A valid AWS access key that has permissions to use Amazon Bedrock and access to models for inference requests.build()
Builds aAmazonBedrockServiceSettings
.Required - The base model ID or an ARN to a custom model based on a foundational model.The model provider for your deployment.rateLimit
(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from Watsonx.This setting helps to minimize the number of rate limit errors returned from Watsonx.Required - The region that your model or ARN is deployed in.Required - A valid AWS secret key that is paired with theaccess_key
.protected AmazonBedrockServiceSettings.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accessKey
Required - A valid AWS access key that has permissions to use Amazon Bedrock and access to models for inference requests.API name:
access_key
-
model
Required - The base model ID or an ARN to a custom model based on a foundational model. The base model IDs can be found in the Amazon Bedrock documentation. Note that the model ID must be available for the provider chosen and your IAM user must have access to the model.API name:
model
-
provider
The model provider for your deployment. Note that some providers may support only certain task types. Supported providers include:amazontitan
- available fortext_embedding
andcompletion
task typesanthropic
- available forcompletion
task type onlyai21labs
- available forcompletion
task type onlycohere
- available fortext_embedding
andcompletion
task typesmeta
- available forcompletion
task type onlymistral
- available forcompletion
task type only
API name:
provider
-
region
Required - The region that your model or ARN is deployed in. The list of available regions per model can be found in the Amazon Bedrock documentation.API name:
region
-
rateLimit
This setting helps to minimize the number of rate limit errors returned from Watsonx. By default, thewatsonxai
service sets the number of requests allowed per minute to 120.API name:
rate_limit
-
rateLimit
public final AmazonBedrockServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from Watsonx. By default, thewatsonxai
service sets the number of requests allowed per minute to 120.API name:
rate_limit
-
secretKey
Required - A valid AWS secret key that is paired with theaccess_key
. For informationg about creating and managing access and secret keys, refer to the AWS documentation.API name:
secret_key
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<AmazonBedrockServiceSettings.Builder>
-
build
Builds aAmazonBedrockServiceSettings
.- Specified by:
build
in interfaceObjectBuilder<AmazonBedrockServiceSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-