diff --git a/src/main.rs b/src/main.rs index b93804b..f81a8ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -509,6 +509,12 @@ enum AudioRecordRequest { #[tokio::main] async fn main() { color_eyre::install().unwrap(); + + if option_env!("OPENAI_API_KEY").is_none() { + eprintln!("Error: OPENAI_API_KEY environment variable not set. The application will not function without it."); + return; + } + let mut terminal: Terminal> = ratatui::init(); let (prediction_in, mut prediction_out) = tokio::sync::watch::channel(None);