OpenAIChatCompletionUsageModel class final
This class represents the chat completion usage model of the OpenAI API, which is used and get returned while using the OpenAIChat
methods.
Constructors
- OpenAIChatCompletionUsageModel({required int promptTokens, required int completionTokens, required int totalTokens})
-
This class represents the chat completion usage model of the OpenAI API, which is used and get returned while using the
OpenAIChat
methods.const -
OpenAIChatCompletionUsageModel.fromMap(Map<
String, dynamic> json) -
This is used to convert a Map<String, dynamic> object to a OpenAIChatCompletionUsageModel object.
factory
Properties
- completionTokens → int
-
The number of tokens used for the chat completion(s).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- promptTokens → int
-
The number of tokens used for the prompt(s).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalTokens → int
-
The total number of tokens used for the chat completion(s).
This is the sum of promptTokens and completionTokens.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - This is used to convert a OpenAIChatCompletionUsageModel object to a Map<String, dynamic> object.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override