pub struct JsonExtractor;Expand description
Extracts JSON from tool output, discarding surrounding text.
Useful for tools that embed JSON in verbose output.
Trait Implementations§
Source§impl OutputTransformer for JsonExtractor
impl OutputTransformer for JsonExtractor
Source§fn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
output: String,
_tool_name: &'life1 str,
_state: &'life2 AgentState,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn transform<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
output: String,
_tool_name: &'life1 str,
_state: &'life2 AgentState,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Transform tool output, optionally using context about which tool
produced it and the current agent state. Read more
Auto Trait Implementations§
impl Freeze for JsonExtractor
impl RefUnwindSafe for JsonExtractor
impl Send for JsonExtractor
impl Sync for JsonExtractor
impl Unpin for JsonExtractor
impl UnsafeUnpin for JsonExtractor
impl UnwindSafe for JsonExtractor
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