CompletionsResponse class

Represents a response from the OpenAI Completions API.

Constructors

CompletionsResponse({required String id, required String object, required int created, required List<Choice> choices, required Usage usage})
Creates a new CompletionsResponse instance.
CompletionsResponse.fromJson(Map<String, dynamic> json)
Creates a CompletionsResponse from a JSON map.
factory

Properties

choices List<Choice>
The choices generated by the model.
final
created int
The Unix timestamp of when the completion was created.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The ID of the completion.
final
object String
The object type of the response.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
usage Usage
The usage statistics for the completion.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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