19 lines
361 B
Rust
19 lines
361 B
Rust
use dotenv::dotenv;
|
|
use std::sync::LazyLock;
|
|
|
|
pub struct Config {
|
|
pub groq_api_key: String,
|
|
}
|
|
|
|
impl Config {
|
|
pub fn new() -> Self {
|
|
dotenv().ok();
|
|
|
|
Self {
|
|
groq_api_key: std::env::var("GROQ_API_KEY").expect("GROQ_API_KEY must be set"),
|
|
}
|
|
}
|
|
}
|
|
|
|
pub static CONFIG: LazyLock<Config> = LazyLock::new(|| Config::new());
|