Choice class

Represents a single generated choice/completion in the response.

Constructors

Choice({String? finishReason, int? index, Message? message})
Choice.fromJson(Map<String, dynamic> json)
Creates a Choice instance from a JSON map.
factory

Properties

finishReason String?
Reason why the generation finished
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
index int?
Index of this choice in the list of choices
getter/setter pair
message Message?
The generated message
getter/setter pair
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
toJson() Map<String, dynamic>
Converts this Choice instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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