Record Class TitanChatBedrockApi.TitanChatRequest.TextGenerationConfig

java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.titan.api.TitanChatBedrockApi.TitanChatRequest.TextGenerationConfig
Record Components:
temperature - The temperature value controls the randomness of the generated text.
topP - The topP value controls the diversity of the generated text. Use a lower value to ignore less probable options.
maxTokenCount - The maximum number of tokens to generate.
stopSequences - A list of sequences to stop the generation at. Specify character sequences to indicate where the model should stop. Use the | (pipe) character to separate different sequences (maximum 20 characters).
Enclosing class:
TitanChatBedrockApi.TitanChatRequest

public static record TitanChatBedrockApi.TitanChatRequest.TextGenerationConfig(Double temperature, Double topP, Integer maxTokenCount, List<String> stopSequences) extends Record
Titan request text generation configuration. https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-text.html
  • Constructor Details

    • TextGenerationConfig

      public TextGenerationConfig(Double temperature, Double topP, Integer maxTokenCount, List<String> stopSequences)
      Creates an instance of a TextGenerationConfig record class.
      Parameters:
      temperature - the value for the temperature record component
      topP - the value for the topP record component
      maxTokenCount - the value for the maxTokenCount record component
      stopSequences - the value for the stopSequences record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • temperature

      public Double temperature()
      Returns the value of the temperature record component.
      Returns:
      the value of the temperature record component
    • topP

      public Double topP()
      Returns the value of the topP record component.
      Returns:
      the value of the topP record component
    • maxTokenCount

      public Integer maxTokenCount()
      Returns the value of the maxTokenCount record component.
      Returns:
      the value of the maxTokenCount record component
    • stopSequences

      public List<String> stopSequences()
      Returns the value of the stopSequences record component.
      Returns:
      the value of the stopSequences record component