Skip to main content

LLMInterface

Trait LLMInterface 

Source
pub trait LLMInterface: Send + Sync {
    // Required methods
    fn generate_response(&self, prompt: &str) -> Result<String>;
    fn generate_summary(
        &self,
        content: &str,
        max_length: usize,
    ) -> Result<String>;
    fn extract_key_points(
        &self,
        content: &str,
        num_points: usize,
    ) -> Result<Vec<String>>;
}
Expand description

Mock LLM interface for testing without external dependencies

Required Methods§

Source

fn generate_response(&self, prompt: &str) -> Result<String>

Generate a response based on the given prompt

Source

fn generate_summary(&self, content: &str, max_length: usize) -> Result<String>

Generate a summary of the content with a maximum length

Source

fn extract_key_points( &self, content: &str, num_points: usize, ) -> Result<Vec<String>>

Extract key points from the content, returning the specified number of points

Implementors§

Source§

impl LLMInterface for AsyncMockLLM

Synchronous LLMInterface implementation for backward compatibility

Source§

impl LLMInterface for MockLLM