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§
Sourcefn summarize(
&self,
system_prompt: &str,
user_content: &str,
) -> Result<SummaryResponse, SummarizeError>
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.