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 Aug 26, 2024
1 parent 0b12094 commit ffda1f7
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 ffda1f7

Please sign in to comment.