OpenAIStreamChatCompletionUsageModel class final

The OpenAIStreamChatCompletionUsageModel class represents the usage model of the OpenAI API, which is used and get returned while using the chat methods that leverages Stream functionality.

Constructors

OpenAIStreamChatCompletionUsageModel({required int promptTokens, required int completionTokens, required int totalTokens})
The OpenAIStreamChatCompletionUsageModel class represents the usage model of the OpenAI API, which is used and get returned while using the chat methods that leverages Stream functionality.
const
OpenAIStreamChatCompletionUsageModel.fromMap(Map<String, dynamic> json)
The OpenAIStreamChatCompletionUsageModel class represents the usage model of the OpenAI API, which is used and get returned while using the chat methods that leverages Stream functionality. This is used to convert a Map<String, dynamic> object to a OpenAIStreamChatCompletionUsageModel 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
toString() String
A string representation of this object.
override

Operators

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