pub struct ToolAnswer<'a> {
pub tool: Option<&'a str>,
pub call: bool,
pub confidence: Option<f64>,
pub multi: bool,
pub tools: &'a [String],
pub selection: Option<MultiAnswer<'a>>,
pub ranking: &'a [ToolRanking],
pub probabilities: &'a IndexMap<String, f64>,
pub raw: &'a Answer,
}Expand description
Checked tool routing answer. This SDK never executes a selected tool.
Fields§
§tool: Option<&'a str>Single selected tool; absent for multi mode or deferral.
call: boolWhether an actual tool was selected.
confidence: Option<f64>Single-tool confidence, absent in multi mode.
multi: boolWhether this is a multi selection.
tools: &'a [String]Selected tool keys in multi mode.
selection: Option<MultiAnswer<'a>>Multi-mode selection threshold or objective score and constraints, with tools as selected labels.
ranking: &'a [ToolRanking]Ranked candidates.
probabilities: &'a IndexMap<String, f64>Server probabilities.
raw: &'a AnswerOriginal result, including deferral metadata.
Trait Implementations§
Source§impl<'a> Clone for ToolAnswer<'a>
impl<'a> Clone for ToolAnswer<'a>
impl<'a> Copy for ToolAnswer<'a>
Auto Trait Implementations§
impl<'a> Freeze for ToolAnswer<'a>
impl<'a> RefUnwindSafe for ToolAnswer<'a>
impl<'a> Send for ToolAnswer<'a>
impl<'a> Sync for ToolAnswer<'a>
impl<'a> Unpin for ToolAnswer<'a>
impl<'a> UnsafeUnpin for ToolAnswer<'a>
impl<'a> UnwindSafe for ToolAnswer<'a>
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