Completion class
A completion response (legacy API).
- Annotations
-
- @immutable
Constructors
-
Completion({required String id, required String object, int? created, required String model, required List<
CompletionChoice> choices, Usage? usage, String? systemFingerprint}) -
Creates a Completion.
const
-
Completion.fromJson(Map<
String, dynamic> json) -
Creates a Completion from JSON.
factory
Properties
-
choices
→ List<
CompletionChoice> -
The completion choices.
final
- created → int?
-
The Unix timestamp.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
The completion ID.
final
- model → String
-
The model used.
final
- object → String
-
The object type (usually "text_completion").
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systemFingerprint → String?
-
The system fingerprint.
final
- text → String?
-
Gets the text of the first choice, or null if there are no choices.
no setter
- usage → Usage?
-
Token usage statistics.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override