Completion class
Response returned by a chat-completion request.
Constructors
-
Completion({required String id, required String object, required int created, required String model, required List<
Choice> choices, required Usage usage}) - Creates a completion response.
- Completion.fromJson(String data)
-
Creates a Completion from a JSON string.
factory
-
Completion.fromMap(Map<
String, dynamic> data) -
Creates a Completion from decoded map data.
factory
Properties
-
choices
→ List<
Choice> -
Completion choices.
final
- created → int
-
Creation timestamp.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Completion identifier.
final
- model → String
-
Model that produced the completion.
final
- object → String
-
OpenAI object type.
final
-
props
→ List<
Object?> -
Values used for equality-style comparisons.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → Usage
-
Token usage for the completion.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String - Converts this completion to JSON.
-
toMap(
) → Map< String, dynamic> - Converts this completion to map data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited