pub struct ToolCallRepair(/* private fields */);Expand description
Async callback that may replace one invalid tool call.
Core invokes this at most once, and parses and validates the returned call
from scratch. Returning None keeps the original validation error.
Implementations§
Source§impl ToolCallRepair
impl ToolCallRepair
pub fn new<F, Fut>(repair: F) -> Selfwhere
F: Fn(ToolCallRepairContext) -> Fut + Send + Sync + 'static,
Fut: Future<Output = Result<Option<RawToolCall>, AiMuxError>> + Send + 'static,
Trait Implementations§
Source§impl Clone for ToolCallRepair
impl Clone for ToolCallRepair
Auto Trait Implementations§
impl !RefUnwindSafe for ToolCallRepair
impl !UnwindSafe for ToolCallRepair
impl Freeze for ToolCallRepair
impl Send for ToolCallRepair
impl Sync for ToolCallRepair
impl Unpin for ToolCallRepair
impl UnsafeUnpin for ToolCallRepair
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