Choice class

A single completion choice.

Constructors

Choice({String? text, Map? message, required int index, dynamic logprobs, String? finishReason, MessageType messageType = MessageType.message})
Creates a completion choice.
Choice.fromJson(String data)
Creates a Choice from a JSON string.
factory
Choice.fromMap(Map<String, dynamic> data)
Creates a Choice from decoded map data.
factory

Properties

finishReason → String?
Finish reason returned by the model.
final
getMessage → String?
Message text returned by this choice.
no setter
hashCode → int
The hash code for this object.
no setterinherited
index → int
Choice index in the response.
final
inlineWidget → Map?
Inline widget tool call requested by this choice, when present.
no setter
logprobs → dynamic
Optional log probability payload.
final
message → Map?
Chat message payload.
final
messageType ↔ MessageType
How Ensemble should render or execute this choice.
getter/setter pair
props → List<Object?>
Values used for equality-style comparisons.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
Text content for legacy completion responses.
final
tool ↔ dynamic
Tool definition associated with this choice.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts this choice to map data.
toString() → String
A string representation of this object.
inherited

Operators

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