pub struct RedactionMiddleware {
pub patterns: Vec<String>,
pub replacement: String,
}Fields§
§patterns: Vec<String>§replacement: StringImplementations§
Trait Implementations§
Source§impl AgentMiddleware for RedactionMiddleware
impl AgentMiddleware for RedactionMiddleware
fn before_model_call<'life0, 'life1, 'async_trait>(
&'life0 self,
batch: &'life1 mut ExecuteBatch,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_agent<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_model_call<'life0, 'life1, 'async_trait>(
&'life0 self,
_result: &'life1 mut TurnResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_args: &'life2 mut Value,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_tool_call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_result: &'life2 mut Result<Value>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
_result: &'life1 mut TurnResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn dynamic_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn dynamic_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_agent_id: &'life1 AgentId,
_user: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
If
Some, replaces the rendered system prompt for this turn.Auto Trait Implementations§
impl Freeze for RedactionMiddleware
impl RefUnwindSafe for RedactionMiddleware
impl Send for RedactionMiddleware
impl Sync for RedactionMiddleware
impl Unpin for RedactionMiddleware
impl UnsafeUnpin for RedactionMiddleware
impl UnwindSafe for RedactionMiddleware
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