pub struct LoggingMiddleware {
pub log: Arc<Mutex<Vec<String>>>,
}Fields§
§log: Arc<Mutex<Vec<String>>>Implementations§
Trait Implementations§
Source§impl AgentMiddleware for LoggingMiddleware
impl AgentMiddleware for LoggingMiddleware
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 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 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,
_r: &'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.Source§impl Clone for LoggingMiddleware
impl Clone for LoggingMiddleware
Source§fn clone(&self) -> LoggingMiddleware
fn clone(&self) -> LoggingMiddleware
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LoggingMiddleware
impl Default for LoggingMiddleware
Source§fn default() -> LoggingMiddleware
fn default() -> LoggingMiddleware
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LoggingMiddleware
impl !RefUnwindSafe for LoggingMiddleware
impl Send for LoggingMiddleware
impl Sync for LoggingMiddleware
impl Unpin for LoggingMiddleware
impl UnsafeUnpin for LoggingMiddleware
impl !UnwindSafe for LoggingMiddleware
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