ChatUsage class

Token accounting for one response.

Constructors

ChatUsage({required int inputTokens, required int outputTokens, int cachedInputTokens = 0})
Creates a usage record.
const

Properties

cachedInputTokens → int
Prompt tokens served from the provider's cache, when reported.
final
hashCode → int
The hash code for this object.
no setterinherited
inputTokens → int
Prompt tokens billed.
final
outputTokens → int
Completion tokens billed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited