#[non_exhaustive]pub struct ChoiceAnswer {
pub choice: String,
pub confidence: f64,
pub probabilities: IndexMap<String, f64>,
}Expand description
The answer to a Choice: the selected option and the probability of each.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.choice: StringThe option with the highest probability.
confidence: f64How certain the model is of the selection, from 0 to 1, derived from probabilities.
probabilities: IndexMap<String, f64>Every option of the question and its probability. They sum to about 1.
Implementations§
Trait Implementations§
Source§impl Clone for ChoiceAnswer
impl Clone for ChoiceAnswer
Source§impl Debug for ChoiceAnswer
impl Debug for ChoiceAnswer
Source§impl PartialEq for ChoiceAnswer
impl PartialEq for ChoiceAnswer
Source§impl Serialize for ChoiceAnswer
impl Serialize for ChoiceAnswer
impl StructuralPartialEq for ChoiceAnswer
Auto Trait Implementations§
impl Freeze for ChoiceAnswer
impl RefUnwindSafe for ChoiceAnswer
impl Send for ChoiceAnswer
impl Sync for ChoiceAnswer
impl Unpin for ChoiceAnswer
impl UnsafeUnpin for ChoiceAnswer
impl UnwindSafe for ChoiceAnswer
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