diff --git a/src/cli.rs b/src/cli.rs index 4d54a73..efde547 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -60,7 +60,7 @@ pub(crate) async fn main() -> anyhow::Result<()> { .init(); let backoff = backoff::ExponentialBackoffBuilder::new() - .with_max_elapsed_time(Some(std::time::Duration::from_secs(60))) + .with_max_elapsed_time(Some(std::time::Duration::from_secs(5 * 60))) .build(); let api_key = if let Ok(api_key) = std::env::var("OPENAI_API_KEY") { diff --git a/src/prompt.rs b/src/prompt.rs index d825c8d..5961bbb 100644 --- a/src/prompt.rs +++ b/src/prompt.rs @@ -66,7 +66,7 @@ pub(crate) async fn chat_completion( }); } Err(e) => { - bail!("{e}"); + bail!(e); } } } @@ -114,7 +114,7 @@ pub(crate) async fn completion( Ok(ccr) => ccr.choices.iter().for_each(|c| { print!("{}", c.text); }), - Err(e) => bail!("{e}"), + Err(e) => bail!(e), } } println!();