Package xyz.tcheeric.jev
Record Class Usage
java.lang.Object
java.lang.Record
xyz.tcheeric.jev.Usage
What the evaluator reports it spent answering. Returned rather than discarded, because a
consumer that pays per token needs to see the bill it just incurred.
There is no total. The API does not send one, and Jev charges for input tokens only, so a sum of the two would be a number nobody is billed on.
-
Constructor Summary
ConstructorsConstructorDescriptionUsage(long inputTokens, long outputTokens) Creates an instance of aUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theinputTokensrecord component.longReturns the value of theoutputTokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Usage
public Usage(long inputTokens, long outputTokens) Creates an instance of aUsagerecord class.- Parameters:
inputTokens- the value for theinputTokensrecord componentoutputTokens- the value for theoutputTokensrecord 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 with '=='. -
inputTokens
public long inputTokens()Returns the value of theinputTokensrecord component.- Returns:
- the value of the
inputTokensrecord component
-
outputTokens
public long outputTokens()Returns the value of theoutputTokensrecord component.- Returns:
- the value of the
outputTokensrecord component
-