AdvisorUsage class

Token usage reported by the advisor model.

Constructors

AdvisorUsage({int? promptTokenCount, int? candidatesTokenCount, int? totalTokenCount, int? thoughtsTokenCount})
Creates an advisor token usage summary.
const
AdvisorUsage.fromUsageMetadata(Object? usageMetadata)
Creates an AdvisorUsage from raw LLM usage metadata, if available.
factory

Properties

candidatesTokenCount → int?
Number of completion tokens produced by the advisor call.
final
hashCode → int
The hash code for this object.
no setterinherited
promptTokenCount → int?
Number of prompt tokens consumed by the advisor call.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
thoughtsTokenCount → int?
Number of reasoning/thought tokens consumed by the advisor call.
final
totalTokenCount → int?
Total tokens consumed by the advisor call.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes this usage record to a JSON-compatible map.
toString() → String
A string representation of this object.
inherited

Operators

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