Skip to main content

SummaryProvider

Trait SummaryProvider 

Source
pub trait SummaryProvider {
    // Required method
    fn summarize(
        &self,
        system_prompt: &str,
        user_content: &str,
    ) -> Result<SummaryResponse, SummarizeError>;
}
Expand description

Trait for LLM providers that can generate summaries.

Implementors send a system prompt and user content to an LLM API and return the generated summary text.

Required Methods§

Source

fn summarize( &self, system_prompt: &str, user_content: &str, ) -> Result<SummaryResponse, SummarizeError>

Generate a summary from the given prompts.

The system prompt provides instructions for how to summarize, while the user content contains the session data to summarize.

Implementors§