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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxTokenCount
record component.Returns the value of thestopSequences
record component.Returns the value of thetemperature
record component.topP()
Returns the value of thetopP
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TextGenerationConfig
public TextGenerationConfig(Double temperature, Double topP, Integer maxTokenCount, List<String> stopSequences) Creates an instance of aTextGenerationConfig
record class.- Parameters:
temperature
- the value for thetemperature
record componenttopP
- the value for thetopP
record componentmaxTokenCount
- the value for themaxTokenCount
record componentstopSequences
- the value for thestopSequences
record component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
temperature
Returns the value of thetemperature
record component.- Returns:
- the value of the
temperature
record component
-
topP
Returns the value of thetopP
record component.- Returns:
- the value of the
topP
record component
-
maxTokenCount
Returns the value of themaxTokenCount
record component.- Returns:
- the value of the
maxTokenCount
record component
-
stopSequences
Returns the value of thestopSequences
record component.- Returns:
- the value of the
stopSequences
record component
-