Skip to content

Commit aa567e6

Browse files
committed
Make chatbot::query_chat compute intensive
1 parent 9d99053 commit aa567e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/chatbot/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub async fn gen_random_number() -> usize {
2222
///
2323
/// Warning: may take a few seconds!
2424
pub async fn query_chat(messages: &[String]) -> Vec<String> {
25-
tokio::time::sleep(Duration::from_secs(2)).await;
25+
std::thread::sleep(Duration::from_secs(2));
2626
let most_recent = messages.last().unwrap();
2727
vec![
2828
format!("\"{most_recent}\"? And how does that make you feel?"),

0 commit comments

Comments
 (0)