Skip to content

Commit

Permalink
Adjust timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
zurawiki committed Jun 14, 2023
1 parent 128c1d7 commit 68d5c66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
4 changes: 2 additions & 2 deletions src/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub(crate) async fn chat_completion(
});
}
Err(e) => {
bail!("{e}");
bail!(e);
}
}
}
Expand Down Expand Up @@ -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!();
Expand Down

0 comments on commit 68d5c66

Please sign in to comment.