diff --git a/src/main.rs b/src/main.rs index 869ea21..92dec2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,11 +31,7 @@ mod session; static DURATION: Lazy> = Lazy::new(Default::default); static COMPLETION: Lazy> = Lazy::new(Default::default); -static COMPLETION_PROMPT: Lazy> = Lazy::new(|| { - Mutex::new(String::from( - "For the personal conversational transcript above, here is a coaching prompt:", - )) -}); +static COMPLETION_PROMPT: Lazy> = Lazy::new(|| Mutex::new(String::from(""))); #[derive(Clone)] struct ChatMessage { @@ -306,18 +302,9 @@ impl eframe::App for App { // let cards = select!(Vec "WHERE NOT deleted").unwrap(); - let mut do_all = false; - SidePanel::left("left_panel").show(ctx, |ui| { ui.label(option_env!("BUILD_ID").unwrap_or("DEV")); - let mut setting = Setting::get("deepgram_api_key"); - ui.label("deepgram api key:"); - ui - .add(TextEdit::singleline(&mut setting.value).desired_width(f32::INFINITY)) - .changed() - .then(|| setting.save()); - let mut setting2 = Setting::get("openai_api_key"); ui.label("openai api key:"); ui @@ -329,12 +316,6 @@ impl eframe::App for App { WHEEL_WINDOWS.lock().unwrap().push(Default::default()); }; - if ui.button("do all").clicked() { - do_all = true; - }; - - ui.label(format!("Duration: {}", *DURATION.lock().unwrap())); - for name in self.speaker_names.iter_mut() { ui.horizontal(|ui| { // ui.label(format!("Speaker {}", i + 1)); @@ -484,7 +465,7 @@ impl eframe::App for App { let (trigger, tripwire) = Tripwire::new(); self.trigger = Some(trigger); tokio::spawn(async move { - run_openai(GPT_4, tripwire, orig_messages, move |content| { + run_openai("gpt-4o-mini", tripwire, orig_messages, move |content| { WHEEL_WINDOWS .lock() .unwrap() @@ -630,20 +611,6 @@ async fn main() -> Result<(), Box> { self_update::self_update().await.ok(); - let mut setting = Setting::get("deepgram_api_key"); - if let Ok(key) = env::var("DEEPGRAM_API_KEY") { - setting.value = key; - setting.save(); - }; - - let mut setting = Setting::get("openai_api_key"); - if let Ok(key) = env::var("OPENAI_API_KEY") { - setting.value = key; - setting.save(); - }; - - // gcal2().await - // Ok(()) // let rt = tokio::runtime::Runtime::new().expect("Unable to create Runtime"); @@ -764,9 +731,6 @@ fn microphone_as_stream() -> Receiver> { async_rx } -const GPT_3_5: &str = "gpt-3.5-turbo-0125"; -const GPT_4: &str = "gpt-4-0125-preview"; - pub(crate) async fn run_openai( model: &str, tripwire: Tripwire,