mod anthropic;
mod credentials;
mod gemini;
mod ollama;
mod openai;
mod retry;
mod transport;
pub use anthropic::AnthropicConfig;
pub(crate) use anthropic::DEFAULT_ANTHROPIC_VERSION;
pub use credentials::ApiKey;
pub use gemini::{GeminiConfig, GeminiServiceTier};
pub use ollama::OllamaConfig;
pub use openai::OpenAiConfig;
pub use retry::RetryPolicy;
pub use transport::TransportConfig;
#[derive(Clone)]
pub enum ProviderKind {
OpenAi(OpenAiConfig),
Anthropic(AnthropicConfig),
Gemini(GeminiConfig),
Ollama(OllamaConfig),
}
#[derive(Clone)]
pub struct ProviderConfig {
kind: ProviderKind,
transport: TransportConfig,
}
impl ProviderConfig {
#[must_use]
pub fn new(kind: ProviderKind, transport: TransportConfig) -> Self {
Self { kind, transport }
}
pub(crate) fn into_parts(self) -> (ProviderKind, TransportConfig) {
(self.kind, self.transport)
}
}