pub trait Cache: Send + Sync {
// Required methods
fn get(&self, prompt: &str) -> Option<String>;
fn set(&self, prompt: &str, response: String);
}Expand description
Trait for prompt caching strategies.
pub trait Cache: Send + Sync {
// Required methods
fn get(&self, prompt: &str) -> Option<String>;
fn set(&self, prompt: &str, response: String);
}Trait for prompt caching strategies.