#[non_exhaustive]pub struct ToolOutcome {
pub call: CallIdentity,
pub name: String,
pub arguments: Value,
pub result: Result<ToolResult, Error>,
pub duration: Duration,
}Expand description
A tool call after it ran.
The error is the one the tool returned, typed, so a hook can downcast it.
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.call: CallIdentityThe call and the agent that made it.
name: StringThe tool.
arguments: ValueThe arguments the call ran with.
result: Result<ToolResult, Error>What the tool returned. A call a hook denied is an Ok error result.
duration: DurationHow long the tool ran.
Implementations§
Source§impl ToolOutcome
impl ToolOutcome
Sourcepub fn for_model(&self) -> ToolResult
pub fn for_model(&self) -> ToolResult
What the model reads of the call.
Trait Implementations§
Auto Trait Implementations§
impl Forget for ToolOutcome
impl Freeze for ToolOutcome
impl Move for ToolOutcome
impl RefUnwindSafe for ToolOutcome
impl Send for ToolOutcome
impl Sync for ToolOutcome
impl Unpin for ToolOutcome
impl UnsafeUnpin for ToolOutcome
impl UnwindSafe for ToolOutcome
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