ChatProvider

Trait ChatProvider 

Source
pub trait ChatProvider: Send + Sync {
    // Required methods
    fn provider_type(&self) -> ProviderType;
    fn name(&self) -> &str;
    fn is_available(&self) -> bool;
    fn sessions_path(&self) -> Option<PathBuf>;
    fn list_sessions(&self) -> Result<Vec<ChatSession>>;
    fn import_session(&self, session_id: &str) -> Result<ChatSession>;
    fn export_session(&self, session: &ChatSession) -> Result<()>;
}
Expand description

Trait for LLM chat providers

Required Methods§

Source

fn provider_type(&self) -> ProviderType

Get the provider type

Source

fn name(&self) -> &str

Get the provider name for display

Source

fn is_available(&self) -> bool

Check if this provider is available/configured

Source

fn sessions_path(&self) -> Option<PathBuf>

Get the base path where sessions are stored

Source

fn list_sessions(&self) -> Result<Vec<ChatSession>>

List all chat sessions from this provider

Source

fn import_session(&self, session_id: &str) -> Result<ChatSession>

Import a session from this provider into CSM format

Source

fn export_session(&self, session: &ChatSession) -> Result<()>

Export a CSM session to this provider’s format

Implementors§