Class AmazonBedrockTaskSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<AmazonBedrockTaskSettings.Builder>
co.elastic.clients.elasticsearch.inference.AmazonBedrockTaskSettings.Builder
- All Implemented Interfaces:
WithJson<AmazonBedrockTaskSettings.Builder>,ObjectBuilder<AmazonBedrockTaskSettings>
- Enclosing class:
- AmazonBedrockTaskSettings
public static class AmazonBedrockTaskSettings.Builder
extends WithJsonObjectBuilderBase<AmazonBedrockTaskSettings.Builder>
implements ObjectBuilder<AmazonBedrockTaskSettings>
Builder for
AmazonBedrockTaskSettings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aAmazonBedrockTaskSettings.maxNewTokens(Integer value) For acompletiontask, it sets the maximum number for the output tokens to be generated.protected AmazonBedrockTaskSettings.Builderself()temperature(Float value) For acompletiontask, it is a number between 0.0 and 1.0 that controls the apparent creativity of the results.For acompletiontask, it limits samples to the top-K most likely words, balancing coherence and variability.For acompletiontask, it is a number in the range of 0.0 to 1.0, to eliminate low-probability tokens.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
-
maxNewTokens
For acompletiontask, it sets the maximum number for the output tokens to be generated.API name:
max_new_tokens -
temperature
For acompletiontask, it is a number between 0.0 and 1.0 that controls the apparent creativity of the results. At temperature 0.0 the model is most deterministic, at temperature 1.0 most random. It should not be used iftop_portop_kis specified.API name:
temperature -
topK
For acompletiontask, it limits samples to the top-K most likely words, balancing coherence and variability. It is only available for anthropic, cohere, and mistral providers. It is an alternative totemperature; it should not be used iftemperatureis specified.API name:
top_k -
topP
For acompletiontask, it is a number in the range of 0.0 to 1.0, to eliminate low-probability tokens. Top-p uses nucleus sampling to select top tokens whose sum of likelihoods does not exceed a certain value, ensuring both variety and coherence. It is an alternative totemperature; it should not be used iftemperatureis specified.API name:
top_p -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<AmazonBedrockTaskSettings.Builder>
-
build
Builds aAmazonBedrockTaskSettings.- Specified by:
buildin interfaceObjectBuilder<AmazonBedrockTaskSettings>- Throws:
NullPointerException- if some of the required fields are null.
-