UsageInfo class

Usage information for API calls

Constructors

UsageInfo({int? promptTokens, int? completionTokens, int? totalTokens, int? reasoningTokens})
const
UsageInfo.fromJson(Map<String, dynamic> json)
factory

Properties

completionTokens → int?
final
hashCode → int
The hash code for this object.
no setteroverride
promptTokens → int?
final
reasoningTokens → int?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalTokens → int?
final

Methods

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

Operators

operator +(UsageInfo other) → UsageInfo
Adds two UsageInfo instances together for token usage accumulation
operator ==(Object other) → bool
The equality operator.
override