The answer to an Omni.Question.Choice.
%Omni.Answer.Choice{
choice: :infra,
probabilities: [billing: 0.02, infra: 0.95, other: 0.03],
confidence: 0.93
}Struct fields
:choice- the most likely choice, by the question's key:probabilities-{key, probability}for every choice, in the question's order and with its keys:confidence- the provider's confidence in the choice, ornilwhen it gives none. Hosts compute it differently, so compare it only within one provider; the probabilities are the portable result
Summary
Functions
Creates a choice answer from a keyword list or map of fields.
Types
@type t() :: %Omni.Answer.Choice{ choice: Omni.Question.key(), confidence: float() | nil, probabilities: [{Omni.Question.key(), float()}] }
The answer to a choice question.
Functions
@spec new(Enumerable.t()) :: t()
Creates a choice answer from a keyword list or map of fields.