Skip to content

Commit 1e014cb

Browse files
committed
Make chatbot::query_chat compute intensive
1 parent 1199f69 commit 1e014cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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
vec![
2727
"And how does that make you feel?".to_string(),
2828
"Interesting! Go on...".to_string(),

0 commit comments

Comments
 (0)