Package akka.javasdk.agent
Record Class SessionMessage.TokenUsage
- Enclosing interface:
SessionMessage
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTokenUsage(int inputTokens, int outputTokens) Creates an instance of aTokenUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionadd(SessionMessage.TokenUsage tokenUsage) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theinputTokensrecord component.intReturns the value of theoutputTokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
TokenUsage
public TokenUsage(int inputTokens, int outputTokens) Creates an instance of aTokenUsagerecord class.- Parameters:
inputTokens- the value for theinputTokensrecord componentoutputTokens- the value for theoutputTokensrecord component
-
-
Method Details
-
add
-
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 with '=='. -
inputTokens
public int inputTokens()Returns the value of theinputTokensrecord component.- Returns:
- the value of the
inputTokensrecord component
-
outputTokens
public int outputTokens()Returns the value of theoutputTokensrecord component.- Returns:
- the value of the
outputTokensrecord component
-