pub struct LoggingProvider<P> { /* private fields */ }Expand description
Provider wrapped with logging
Trait Implementations§
Source§impl<P: Debug> Debug for LoggingProvider<P>
impl<P: Debug> Debug for LoggingProvider<P>
Source§impl<P: Provider> LayeredProvider for LoggingProvider<P>
impl<P: Provider> LayeredProvider for LoggingProvider<P>
Source§fn layered_chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn layered_chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Default implementation for chat_completion - forwards to inner
Source§fn layered_stream_chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<ChatCompletionStream>, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn layered_stream_chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<ChatCompletionStream>, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Default implementation for stream_chat_completion - forwards to inner
Source§fn layered_info(&self) -> Arc<ProviderInfo>
fn layered_info(&self) -> Arc<ProviderInfo>
Default implementation for info - forwards to inner
Source§impl<P: Provider> Provider for LoggingProvider<P>
impl<P: Provider> Provider for LoggingProvider<P>
Source§fn info(&self) -> Arc<ProviderInfo>
fn info(&self) -> Arc<ProviderInfo>
Get provider information
Source§fn chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Chat completion (non-streaming) Read more
Source§fn stream_chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<ChatCompletionStream>, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_chat_completion<'life0, 'async_trait>(
&'life0 self,
req: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Box<ChatCompletionStream>, AiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream chat completion Read more
Auto Trait Implementations§
impl<P> Freeze for LoggingProvider<P>where
P: Freeze,
impl<P> RefUnwindSafe for LoggingProvider<P>where
P: RefUnwindSafe,
impl<P> Send for LoggingProvider<P>where
P: Send,
impl<P> Sync for LoggingProvider<P>where
P: Sync,
impl<P> Unpin for LoggingProvider<P>where
P: Unpin,
impl<P> UnwindSafe for LoggingProvider<P>where
P: UnwindSafe,
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