Class AmazonBedrockTaskSettings

java.lang.Object
co.elastic.clients.elasticsearch.inference.AmazonBedrockTaskSettings
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class AmazonBedrockTaskSettings extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

    • maxNewTokens

      @Nullable public final Integer maxNewTokens()
      For a completion task, it sets the maximum number for the output tokens to be generated.

      API name: max_new_tokens

    • temperature

      @Nullable public final Float temperature()
      For a completion task, 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

      @Nullable public final Float topK()
      For a completion task, 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

      @Nullable public final Float topP()
      For a completion task, 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

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupAmazonBedrockTaskSettingsDeserializer

      protected static void setupAmazonBedrockTaskSettingsDeserializer(ObjectDeserializer<AmazonBedrockTaskSettings.Builder> op)