ChoiceQuestion class final

One of several options for a text: "shipping", "billing" or "other".

Constructors

ChoiceQuestion(Map<String, String> criteria, {String? instructions, double? temperature, ChoiceScoringMode scoringMode = ChoiceScoringMode.auto, bool normalizePrior = false})
criteria maps each option's key to a description of when it applies, in the order results list them. instructions is an optional task prompt for the model.

Properties

criteria → Map<String, String>
Each option's key and description, in order.
final
hashCode → int
The hash code for this object.
no setterinherited
instructions → String?
An optional task prompt.
final
normalizePrior → bool
Whether to subtract the empty-context prior. Google's browser runtime ignores it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scoringMode → ChoiceScoringMode
How the options are scored. Google's browser runtime ignores it.
final
temperature → double?
Softmax temperature; null uses the model's calibrated one.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
The question as Google's JavaScript API names it.
toString() → String
A string representation of this object.
inherited

Operators

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