pub struct ChoiceAnswer<T: Ord> {
pub choice: T,
pub probabilities: BTreeMap<T, f64>,
pub confidence: f64,
}Expand description
A selected application value and the full distribution over alternatives.
Fields§
§choice: TThe selected application value.
probabilities: BTreeMap<T, f64>The full distribution over the supplied alternatives or levels.
confidence: f64Provider-reported concentration, not a probability of correctness.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for ChoiceAnswer<T>where
T: Deserialize<'de> + Ord,
impl<'de, T> Deserialize<'de> for ChoiceAnswer<T>where
T: Deserialize<'de> + Ord,
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
Auto Trait Implementations§
impl<T> Freeze for ChoiceAnswer<T>
impl<T> RefUnwindSafe for ChoiceAnswer<T>
impl<T> Send for ChoiceAnswer<T>
impl<T> Sync for ChoiceAnswer<T>
impl<T> Unpin for ChoiceAnswer<T>
impl<T> UnsafeUnpin for ChoiceAnswer<T>
impl<T> UnwindSafe for ChoiceAnswer<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.