pub enum Answer {
Noul {
noul: f64,
},
Choice {
choice: String,
probabilities: BTreeMap<String, f64>,
confidence: f64,
},
Score {
score: f64,
legend: BTreeMap<String, Value>,
probabilities: BTreeMap<String, f64>,
confidence: f64,
},
}Expand description
A typed answer returned by System One.
Numeric fields use f64 for convenient comparisons and arithmetic. For exact JSON
number preservation, use Response::raw_body.
Variants§
Noul
A yes/no answer represented as the probability of yes.
Choice
The selected option and its probability distribution.
Fields
Score
An expected score and its probability distribution.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Answer
impl<'de> Deserialize<'de> for Answer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Answer
Auto Trait Implementations§
impl Forget for Answer
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