Skip to main content

ExtractionProvider

Trait ExtractionProvider 

Source
pub trait ExtractionProvider: Send + Sync {
    // Required method
    fn extract(
        &self,
        conversation: &str,
        system_prompt: &str,
    ) -> impl Future<Output = Result<String, ExtractionError>> + Send;
}
Expand description

Trait for LLM providers that can extract memories from conversation text.

Required Methods§

Source

fn extract( &self, conversation: &str, system_prompt: &str, ) -> impl Future<Output = Result<String, ExtractionError>> + Send

Send a conversation to the LLM with the given system prompt and return the raw response text (expected to be JSON).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§