pub struct LoggingLLMMiddleware { /* private fields */ }Expand description
Logging middleware that logs LLM requests and responses.
Implementations§
Source§impl LoggingLLMMiddleware
impl LoggingLLMMiddleware
Sourcepub fn with_level(level: LogLevel) -> Self
pub fn with_level(level: LogLevel) -> Self
Create a logging middleware with specified log level.
Trait Implementations§
Source§impl Default for LoggingLLMMiddleware
impl Default for LoggingLLMMiddleware
Source§impl LLMMiddleware for LoggingLLMMiddleware
impl LLMMiddleware for LoggingLLMMiddleware
Source§fn before<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LLMRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LLMRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called before LLM request is sent. Read more
Source§fn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 LLMRequest,
response: &'life2 LLMResponse,
duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
request: &'life1 LLMRequest,
response: &'life2 LLMResponse,
duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called after LLM response is received. Read more
Auto Trait Implementations§
impl Freeze for LoggingLLMMiddleware
impl RefUnwindSafe for LoggingLLMMiddleware
impl Send for LoggingLLMMiddleware
impl Sync for LoggingLLMMiddleware
impl Unpin for LoggingLLMMiddleware
impl UnsafeUnpin for LoggingLLMMiddleware
impl UnwindSafe for LoggingLLMMiddleware
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