Usage class

Represents usage statistics for the API request.

Constructors

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

Properties

completionTokens int?
Number of tokens in the completion
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
promptTokens int?
Number of tokens in the prompt
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalTokens int?
Total number of tokens used
getter/setter pair

Methods

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

Operators

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