Record Class TextStreamingChatResponse.TextChatUsage
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.watsonx.bean.TextStreamingChatResponse.TextChatUsage
- Enclosing class:
TextStreamingChatResponse
-
Constructor Summary
ConstructorsConstructorDescriptionTextChatUsage(Integer completionTokens, Integer promptTokens, Integer totalTokens) Creates an instance of aTextChatUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompletionTokensrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepromptTokensrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalTokensrecord component.dev.langchain4j.model.output.TokenUsage
-
Constructor Details
-
TextChatUsage
Creates an instance of aTextChatUsagerecord class.- Parameters:
completionTokens- the value for thecompletionTokensrecord componentpromptTokens- the value for thepromptTokensrecord componenttotalTokens- the value for thetotalTokensrecord component
-
-
Method Details
-
toTokenUsage
public dev.langchain4j.model.output.TokenUsage toTokenUsage() -
toString
-
hashCode
-
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). -
completionTokens
Returns the value of thecompletionTokensrecord component.- Returns:
- the value of the
completionTokensrecord component
-
promptTokens
Returns the value of thepromptTokensrecord component.- Returns:
- the value of the
promptTokensrecord component
-
totalTokens
Returns the value of thetotalTokensrecord component.- Returns:
- the value of the
totalTokensrecord component
-