use std::sync::Arc;
use rig_core::providers::{anthropic, ollama, openai};
use super::LlmKind;
#[derive(Clone)]
pub(super) enum InnerLlm {
Ollama(Arc<ollama::Client>),
OpenAI(Arc<openai::Client>),
Anthropic(Arc<anthropic::Client>),
}
impl InnerLlm {
pub(super) fn kind(&self) -> LlmKind {
match self {
Self::Ollama(_) => LlmKind::Ollama,
Self::OpenAI(_) => LlmKind::OpenAI,
Self::Anthropic(_) => LlmKind::Anthropic,
}
}
}
impl std::fmt::Debug for InnerLlm {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple("InnerLlm").field(&self.kind()).finish()
}
}