Record Class TitanChatBedrockApi.TitanChatResponse.Result
java.lang.Object
java.lang.Record
org.springframework.ai.bedrock.titan.api.TitanChatBedrockApi.TitanChatResponse.Result
- Record Components:
tokenCount
- The number of tokens in the generated text.outputText
- The generated text.completionReason
- The reason the response finished being generated.
- Enclosing class:
- TitanChatBedrockApi.TitanChatResponse
public static record TitanChatBedrockApi.TitanChatResponse.Result(Integer tokenCount, String outputText, TitanChatBedrockApi.TitanChatResponse.CompletionReason completionReason)
extends Record
Titan response result.
-
Constructor Summary
ConstructorDescriptionResult
(Integer tokenCount, String outputText, TitanChatBedrockApi.TitanChatResponse.CompletionReason completionReason) Creates an instance of aResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompletionReason
record component.final 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 theoutputText
record component.Returns the value of thetokenCount
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Result
public Result(Integer tokenCount, String outputText, TitanChatBedrockApi.TitanChatResponse.CompletionReason completionReason) Creates an instance of aResult
record class.- Parameters:
tokenCount
- the value for thetokenCount
record componentoutputText
- the value for theoutputText
record componentcompletionReason
- the value for thecompletionReason
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)
. -
tokenCount
Returns the value of thetokenCount
record component.- Returns:
- the value of the
tokenCount
record component
-
outputText
Returns the value of theoutputText
record component.- Returns:
- the value of the
outputText
record component
-
completionReason
Returns the value of thecompletionReason
record component.- Returns:
- the value of the
completionReason
record component
-