Open skrawani opened 1 year ago
It's something I've considered adding, but I've no immediate plans
Just adding a real-world use case: the generative models from Google AI return a JSON stream. However, since json-stream
does not support async iterators, I need to make a sync API call. And this has to be done on a thread to avoid blocking the main thread with mostly just waiting for the API to respond.
Since there is workaround, I can still use json-stream
here, but it is somewhat inconvenient.
I noticed that there is no mention of asyncio support. Are there any plans to support asyncio in the future? Currently, when async generators are used, it throws a
TypeError: 'async_generator' object is not an iterator
.