Class GoogleVertexAITaskSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GoogleVertexAITaskSettings.Builder>
co.elastic.clients.elasticsearch.inference.GoogleVertexAITaskSettings.Builder
- All Implemented Interfaces:
WithJson<GoogleVertexAITaskSettings.Builder>,ObjectBuilder<GoogleVertexAITaskSettings>
- Enclosing class:
- GoogleVertexAITaskSettings
public static class GoogleVertexAITaskSettings.Builder
extends WithJsonObjectBuilderBase<GoogleVertexAITaskSettings.Builder>
implements ObjectBuilder<GoogleVertexAITaskSettings>
Builder for
GoogleVertexAITaskSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoTruncate(Boolean value) For atext_embeddingtask, truncate inputs longer than the maximum token length automatically.build()Builds aGoogleVertexAITaskSettings.Forcompletionandchat_completiontasks, specifies themax_tokensvalue for requests sent to the Google Model Gardenanthropicprovider.protected GoogleVertexAITaskSettings.Builderself()thinkingConfig(ThinkingConfig value) For acompletionorchat_completiontask, allows configuration of the thinking features for the model.For acompletionorchat_completiontask, allows configuration of the thinking features for the model.For areranktask, the number of the top N documents that should be returned.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
-
autoTruncate
For atext_embeddingtask, truncate inputs longer than the maximum token length automatically.API name:
auto_truncate -
topN
For areranktask, the number of the top N documents that should be returned.API name:
top_n -
thinkingConfig
For acompletionorchat_completiontask, allows configuration of the thinking features for the model. Refer to the Google documentation for the allowable configurations for each model type.API name:
thinking_config -
thinkingConfig
public final GoogleVertexAITaskSettings.Builder thinkingConfig(Function<ThinkingConfig.Builder, ObjectBuilder<ThinkingConfig>> fn) For acompletionorchat_completiontask, allows configuration of the thinking features for the model. Refer to the Google documentation for the allowable configurations for each model type.API name:
thinking_config -
maxTokens
Forcompletionandchat_completiontasks, specifies themax_tokensvalue for requests sent to the Google Model Gardenanthropicprovider. Ifprovideris not set toanthropic, this field is ignored. Ifmax_tokensis specified - it must be a positive integer. If not specified, the default value of 1024 is used. Anthropic models requiremax_tokensto be set for each request. Please refer to the Anthropic documentation for more information.API name:
max_tokens -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<GoogleVertexAITaskSettings.Builder>
-
build
Builds aGoogleVertexAITaskSettings.- Specified by:
buildin interfaceObjectBuilder<GoogleVertexAITaskSettings>- Throws:
NullPointerException- if some of the required fields are null.
-