use crate::AppConfig;

impl AppConfig {
    pub fn ai_basic_url(&self) -> anyhow::Result<String> {
        if let Some(url) = self.env.get("APP_AI_BASIC_URL") {
            return Ok(url.to_string());
        }
        Err(anyhow::anyhow!("APP_AI_BASIC_URL not found"))
    }
    pub fn ai_api_key(&self) -> anyhow::Result<String> {
        if let Some(api_key) = self.env.get("APP_AI_API_KEY") {
            return Ok(api_key.to_string());
        }
        Err(anyhow::anyhow!("APP_AI_API_KEY not found"))
    }
}
