Class AnthropicServiceSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<AnthropicServiceSettings.Builder>
co.elastic.clients.elasticsearch.inference.AnthropicServiceSettings.Builder
- All Implemented Interfaces:
WithJson<AnthropicServiceSettings.Builder>
,ObjectBuilder<AnthropicServiceSettings>
- Enclosing class:
- AnthropicServiceSettings
public static class AnthropicServiceSettings.Builder
extends WithJsonObjectBuilderBase<AnthropicServiceSettings.Builder>
implements ObjectBuilder<AnthropicServiceSettings>
Builder for
AnthropicServiceSettings
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRequired - A valid API key for the Anthropic API.build()
Builds aAnthropicServiceSettings
.Required - The name of the model to use for the inference task.rateLimit
(RateLimitSetting value) This setting helps to minimize the number of rate limit errors returned from Anthropic.This setting helps to minimize the number of rate limit errors returned from Anthropic.protected AnthropicServiceSettings.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
-
apiKey
Required - A valid API key for the Anthropic API.API name:
api_key
-
modelId
Required - The name of the model to use for the inference task. Refer to the Anthropic documentation for the list of supported models.API name:
model_id
-
rateLimit
This setting helps to minimize the number of rate limit errors returned from Anthropic. By default, theanthropic
service sets the number of requests allowed per minute to 50.API name:
rate_limit
-
rateLimit
public final AnthropicServiceSettings.Builder rateLimit(Function<RateLimitSetting.Builder, ObjectBuilder<RateLimitSetting>> fn) This setting helps to minimize the number of rate limit errors returned from Anthropic. By default, theanthropic
service sets the number of requests allowed per minute to 50.API name:
rate_limit
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<AnthropicServiceSettings.Builder>
-
build
Builds aAnthropicServiceSettings
.- Specified by:
build
in interfaceObjectBuilder<AnthropicServiceSettings>
- Throws:
NullPointerException
- if some of the required fields are null.
-