Skip to content

Commit

Permalink
Make chatbot::query_chat compute intensive
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Sep 4, 2024
1 parent 6c7dd80 commit 4f469e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/chatbot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub async fn gen_random_number() -> usize {
///
/// Warning: may take a few seconds!
pub async fn query_chat(messages: &[String]) -> Vec<String> {
tokio::time::sleep(Duration::from_secs(2)).await;
std::thread::sleep(Duration::from_secs(2));
let most_recent = messages.last().unwrap();
vec![
format!("\"{most_recent}\"? And how does that make you feel?"),
Expand Down

0 comments on commit 4f469e5

Please sign in to comment.