GroqUsage class

Available extensions

Constructors

GroqUsage({required int promptTokens, required int completionTokens, required Duration promptTime, required Duration completionTime})
The usage of the groq resources
It contains the number of tokens used in the prompt and completion
It also contains the time taken in the prompt and completion
It is used for chats and audio responses
Audio responses just have a completion time, prompt tokens and completion tokens

Properties

completionTime Duration
The time taken in the completion
final
completionTokens int
The number of tokens used in the completion
final
hashCode int
The hash code for this object.
no setterinherited
promptTime Duration
The time taken in the prompt
final
promptTokens int
The number of tokens used in the prompt
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalTime Duration
Returns the total time taken in the prompt and completion
no setter
totalTokens int
Returns the total tokens used in the prompt and completion
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>

Available on GroqUsage, provided by the GroqUsageExtension extension

toString() String
A string representation of this object.
inherited

Operators

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