OpenAICompletionModel class final
This represents the response from a completion request.
- Annotations
-
- @immutable
Constructors
-
OpenAICompletionModel({required String id, required DateTime created, required String model, required List<
OpenAICompletionModelChoice> choices, required OpenAICompletionModelUsage? usage}) -
This represents the response from a completion request.
const
-
OpenAICompletionModel.fromMap(Map<
String, dynamic> json) -
This represents the response from a completion request.
This method is used to convert a Map<String, dynamic> object to a OpenAICompletionModel object.
factory
Properties
-
choices
→ List<
OpenAICompletionModelChoice> -
The choices generated by the completion.
final
- created → DateTime
-
The date the completion was created.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- haveChoices → bool
-
Weither the completion have at least one choice in choices.
no setter
- id → String
-
The ID of the completion.
final
- model → String
-
The model used to generate the completion.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → OpenAICompletionModelUsage?
-
The usage of the completion, if any.
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 ==(
covariant OpenAICompletionModel other) → bool -
The equality operator.
override