pub trait ResponseProcessor: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn process_response<'life0, 'async_trait>(
&'life0 self,
response: LlmResponse,
) -> Pin<Box<dyn Future<Output = Result<LlmResponse, ProcessorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for processing LLM responses after they are received.
Required Methods§
Sourcefn process_response<'life0, 'async_trait>(
&'life0 self,
response: LlmResponse,
) -> Pin<Box<dyn Future<Output = Result<LlmResponse, ProcessorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_response<'life0, 'async_trait>(
&'life0 self,
response: LlmResponse,
) -> Pin<Box<dyn Future<Output = Result<LlmResponse, ProcessorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process the response, potentially modifying it.