pub struct TransformerChain { /* private fields */ }Expand description
Pipes output through multiple transformers in order.
Implementations§
Source§impl TransformerChain
impl TransformerChain
Sourcepub fn new(transformers: Vec<Box<dyn OutputTransformer>>) -> Self
pub fn new(transformers: Vec<Box<dyn OutputTransformer>>) -> Self
Create a chain from a list of transformers.
Trait Implementations§
Source§impl OutputTransformer for TransformerChain
impl OutputTransformer for TransformerChain
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 TransformerChain
impl !RefUnwindSafe for TransformerChain
impl Send for TransformerChain
impl Sync for TransformerChain
impl Unpin for TransformerChain
impl UnsafeUnpin for TransformerChain
impl !UnwindSafe for TransformerChain
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