Class 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>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • maxNewTokens

      public final AmazonBedrockTaskSettings.Builder maxNewTokens(@Nullable Integer value)
      For chat_completion and completion tasks, it sets the maximum number for the output tokens to be generated.

      API name: max_new_tokens

    • temperature

      public final AmazonBedrockTaskSettings.Builder temperature(@Nullable Float value)
      For chat_completion and completion tasks, 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 if top_p or top_k is specified.

      API name: temperature

    • topK

      public final AmazonBedrockTaskSettings.Builder topK(@Nullable Float value)
      For chat_completion and completion tasks, 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 to temperature; it should not be used if temperature is specified.

      API name: top_k

    • topP

      public final AmazonBedrockTaskSettings.Builder topP(@Nullable Float value)
      For chat_completion and completion tasks, 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 to temperature; it should not be used if temperature is specified.

      API name: top_p

    • self

      Specified by:
      self in class WithJsonObjectBuilderBase<AmazonBedrockTaskSettings.Builder>
    • build

      public AmazonBedrockTaskSettings build()
      Specified by:
      build in interface ObjectBuilder<AmazonBedrockTaskSettings>
      Throws:
      NullPointerException - if some of the required fields are null.