pub enum ToolResultAction {
Keep,
Rewrite(ToolOutput),
Stop(String),
}Expand description
Action for post-tool hooks.
Variants§
Keep
Keep the current presentation.
Rewrite(ToolOutput)
Replace the effective presentation sent to the model and result-content telemetry.
Stop(String)
Stop the run.
Implementations§
Source§impl ToolResultAction
impl ToolResultAction
Sourcepub fn rewrite(result: impl Into<String>) -> Self
pub fn rewrite(result: impl Into<String>) -> Self
Creates an action that replaces the effective presentation sent to the model and result-content telemetry.
The tool’s raw structured result remains unchanged.
Sourcepub fn rewrite_output(output: ToolOutput) -> Self
pub fn rewrite_output(output: ToolOutput) -> Self
Creates an action that replaces the effective model and telemetry presentation with explicit structured or multimodal output.
Trait Implementations§
Source§impl Clone for ToolResultAction
impl Clone for ToolResultAction
Source§fn clone(&self) -> ToolResultAction
fn clone(&self) -> ToolResultAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolResultAction
impl Debug for ToolResultAction
Source§impl PartialEq for ToolResultAction
impl PartialEq for ToolResultAction
impl StructuralPartialEq for ToolResultAction
Auto Trait Implementations§
impl Freeze for ToolResultAction
impl RefUnwindSafe for ToolResultAction
impl Send for ToolResultAction
impl Sync for ToolResultAction
impl Unpin for ToolResultAction
impl UnsafeUnpin for ToolResultAction
impl UnwindSafe for ToolResultAction
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