codei-llm 0.0.11

终端优先的 AI 编程 Agent,用自然语言在本地仓库中读代码、改代码、跑命令、调试问题。
Documentation
mod anthropic;
mod client;
mod openai;

pub use anthropic::AnthropicProvider;
pub use client::build_http_client;
pub use openai::OpenAiProvider;

use async_trait::async_trait;

use crate::{ChatRequest, ChatStream, LlmError};

#[async_trait]
pub trait LlmProvider: Send + Sync {
    fn id(&self) -> &str;

    fn supports_tools(&self) -> bool {
        true
    }

    async fn chat(&self, request: ChatRequest) -> Result<ChatStream, LlmError>;
}