pub struct PatchToolCallsMiddleware;Expand description
Middleware that detects and patches dangling tool call messages in the conversation history.
A “dangling” tool call occurs when a tool_call message references a
tool_call_id that has no corresponding tool_result message.
Trait Implementations§
Source§impl Debug for PatchToolCallsMiddleware
impl Debug for PatchToolCallsMiddleware
Source§impl Default for PatchToolCallsMiddleware
impl Default for PatchToolCallsMiddleware
Source§fn default() -> PatchToolCallsMiddleware
fn default() -> PatchToolCallsMiddleware
Returns the “default value” for a type. Read more
Source§impl Middleware for PatchToolCallsMiddleware
impl Middleware for PatchToolCallsMiddleware
Source§fn process(
&self,
input: MiddlewareInput,
) -> BoxFuture<'_, Result<MiddlewareResult, AgentError>>
fn process( &self, input: MiddlewareInput, ) -> BoxFuture<'_, Result<MiddlewareResult, AgentError>>
Process the input and optionally call through to the next layer. Read more
Auto Trait Implementations§
impl Freeze for PatchToolCallsMiddleware
impl RefUnwindSafe for PatchToolCallsMiddleware
impl Send for PatchToolCallsMiddleware
impl Sync for PatchToolCallsMiddleware
impl Unpin for PatchToolCallsMiddleware
impl UnsafeUnpin for PatchToolCallsMiddleware
impl UnwindSafe for PatchToolCallsMiddleware
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