use anyhow::Result;
pub mod definitions;
pub mod aliases;
pub mod audio;
pub mod chat;
pub mod completion;
pub mod config;
pub mod embed;
pub mod image;
pub mod keys;
pub mod logging;
pub mod mcp;
pub mod models;
pub mod prompts;
pub mod providers;
pub mod proxy;
pub mod search;
pub mod sync;
pub mod templates;
pub mod usage;
pub mod utils;
pub mod vectors;
pub mod webchatproxy;
pub use definitions::*;
pub fn set_debug_mode(enabled: bool) {
crate::DEBUG_MODE.store(enabled, std::sync::atomic::Ordering::Relaxed);
}
#[allow(dead_code)]
pub fn parse_env_var(s: &str) -> Result<(String, String), String> {
let parts: Vec<&str> = s.splitn(2, '=').collect();
if parts.len() != 2 {
return Err(format!(
"Invalid environment variable format: '{}'. Expected 'KEY=VALUE'",
s
));
}
Ok((parts[0].to_string(), parts[1].to_string()))
}