64bit / async-openai

Rust library for OpenAI
https://docs.rs/async-openai
MIT License
1.09k stars 161 forks source link

Making the sleep asynchronous compatible in an example #200

Closed sgopalan98 closed 5 months ago

sgopalan98 commented 5 months ago

Resolves #194 .

Using std::thread::sleep in async code is not advisable. tokio::time::sleep is preferred instead. This PR contains this small change.

Tested the code change by running locally - works as expected!