ChoiceAnswer class final

Calibrated result for a ChoiceQuestion.

Inheritance

Constructors

ChoiceAnswer({required String choice, required double confidence, required Map<String, double> probabilities})
Creates a ChoiceAnswer.
const
ChoiceAnswer.fromJson(Map<String, dynamic> json)
Creates a ChoiceAnswer from a JSON map.
factory

Properties

choice → String
The option ID with the highest calibrated probability.
final
confidence → double
Closed-world confidence score in [0, 1] equal to the calibrated probability of the winning outcome.
final
hashCode → int
The hash code for this object.
no setterinherited
probabilities → Map<String, double>
Closed-world normalized probability in [0, 1] for each option ID.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
Discriminator identifying the answer kind ('noul', 'choice', or 'score').
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this DecisionAnswer to a JSON map.
override
toString() → String
A string representation of this object.
inherited

Operators

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