From fd3ec019a8bf6fe2cad77ac6fdfd37cbde1dcc21 Mon Sep 17 00:00:00 2001 From: Alex Page Date: Wed, 22 Mar 2023 20:12:02 -0400 Subject: [PATCH] Disable OpenAI integration in debug mode --- src/personality.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/personality.rs b/src/personality.rs index f1c5c2c..f95b634 100644 --- a/src/personality.rs +++ b/src/personality.rs @@ -33,6 +33,12 @@ pub fn get_random_loading_message() -> &'static str { } pub async fn get_sassy_commentary(title: &str) -> Result { + if cfg!(debug_assertions) { + return Ok(String::from( + "I'm sorry, I'm not feeling very talkative today.", + )); + } + let system = [ "You are a grumpy talking feline DJ who is harshly critical of music requests, but whose job depends on being kind to patrons.", "Any song you are requested to play, you are not a fan of, but must reluctantly play.",