Usage class

Represents the usage statistics for a completion.

Constructors

Usage({required int promptTokens, required int completionTokens, required int totalTokens})
Creates a new Usage instance.
Usage.fromJson(Map<String, dynamic> json)
Creates a Usage from a JSON map.
factory

Properties

completionTokens int
The number of tokens in the completion.
final
hashCode int
The hash code for this object.
no setterinherited
promptTokens int
The number of tokens in the prompt.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalTokens int
The total number of tokens used.
final

Methods

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

Operators

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