LlmClient

Trait LlmClient 

Source
pub trait LlmClient: Send + Sync {
    // Required methods
    fn generate_commit_message<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        diff: &'life1 str,
        template: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Result<(String, String)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn provider_name(&self) -> &str;
}
Expand description

Trait for LLM clients that can generate commit messages

Required Methods§

Source

fn generate_commit_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, diff: &'life1 str, template: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<(String, String)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Generate a commit message from a git diff

§Arguments
  • diff - The git diff to analyze
  • template - Optional template for the commit message format
§Returns

A tuple of (title, description) for the commit message

Source

fn provider_name(&self) -> &str

Get the provider name for display

Implementors§