opi-ai 0.1.0

Unified multi-provider LLM API with streaming support
Documentation
//! LLM provider abstraction.

use async_trait::async_trait;

use crate::stream::StreamEvent;

#[async_trait]
pub trait Provider: Send + Sync {
    async fn complete(
        &self,
        messages: &[serde_json::Value],
    ) -> Result<Vec<StreamEvent>, crate::Error>;
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ProviderKind {
    OpenAI,
    Anthropic,
    Google,
    Mistral,
    Bedrock,
    Azure,
}