Closed MarcSkovMadsen closed 1 year ago
I'm hesitant about converting all the examples to asynchronous code since it's not required to use ChatInterface, and some individuals, myself included a few years back, may not be familiar with async programming and might lose interest or become perplexed when encountering async code.
I'd be happy to add echo_stream_async.py
as an example though.
Ok. Thats is a good idea.
Its best practice to use
async
functions and methods for chat interfaces. This would also help us when we deploy them.I can see some examples use sync
sleep
oropenai
methods. One example is echo_stream.py. We should convert them toasync
examples.