OpenAIStreamChatCompletionModel class final
The OpenAIStreamChatCompletionModel class represents the chat completion response model of the OpenAI API, which is used and get returned while using the chat methods that leverages Stream functionality.
Constructors
-
OpenAIStreamChatCompletionModel({required String id, required DateTime created, required List<
OpenAIStreamChatCompletionChoiceModel> choices}) -
The OpenAIStreamChatCompletionModel class represents the chat completion response model of the OpenAI API, which is used and get returned while using the chat methods that leverages Stream functionality.
const
-
OpenAIStreamChatCompletionModel.fromMap(Map<
String, dynamic> json) -
The OpenAIStreamChatCompletionModel class represents the chat completion response 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 OpenAIStreamChatCompletionModel object.
factory
Properties
-
choices
→ List<
OpenAIStreamChatCompletionChoiceModel> -
The choices of the chat completion.
final
- created → DateTime
-
The date and time when the chat completion is created.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- haveChoices → bool
-
Weither the chat completion have at least one choice in choices.
no setter
- id → String
-
The id of the chat completion.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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