pub mod adapter;
pub use adapter::AnthropicModel;
use std::env;
use crate::providers::http::adapter::HttpAgentProvider;
use self::adapter::AnthropicApiAdapter;
pub type AnthropicApiProvider = HttpAgentProvider<AnthropicApiAdapter>;
impl AnthropicApiProvider {
pub fn from_env() -> Self {
let api_key = env::var("ANTHROPIC_API_KEY").expect("ANTHROPIC_API_KEY must be set");
HttpAgentProvider::new(AnthropicApiAdapter::new(api_key))
}
pub fn with_api_key(api_key: String) -> Self {
HttpAgentProvider::new(AnthropicApiAdapter::new(api_key))
}
}