pub enum Answer {
Noul {
noul: f64,
},
Choice {
choice: String,
probabilities: OrderedMap<f64>,
confidence: f64,
},
Score {
score: f64,
legend: OrderedMap<String>,
probabilities: OrderedMap<f64>,
confidence: f64,
},
}Expand description
One answer in a System One response.
The type tag is what makes the three shapes distinguishable: a choice
carries a winner and a distribution, a noul carries the probability of
true, and a score carries a probability-weighted value plus the legend
that maps its levels back to text.
Variants§
Noul
Answer a yes/no question.
Choice
Pick one of several described options.
Fields
§
probabilities: OrderedMap<f64>Full distribution over the declared options.
§
confidence: f64Certainty proxy; see CONFIDENCE_METHOD.
Score
Pick one of several ordered levels.
Fields
§
legend: OrderedMap<String>Level index to level text, in declared order.
§
probabilities: OrderedMap<f64>Full distribution over the declared levels.
§
confidence: f64Certainty proxy; see CONFIDENCE_METHOD.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Answer
impl RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl UnsafeUnpin for Answer
impl UnwindSafe for Answer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more