Stability-AI / stability-sdk

SDK for interacting with stability.ai APIs (e.g. stable diffusion inference)
https://platform.stability.ai/
MIT License
2.42k stars 336 forks source link

Async support #197

Open bradyneal opened 1 year ago

bradyneal commented 1 year ago

I (and probably many other devs) desperately need this SDK to support async. This is why https://github.com/itayzit/openai-async was made and why OpenAI later added it to their API (see bottom of https://pypi.org/project/openai/).

Any chance there are plans to support async or there are alternative (forks) that support it?

palp commented 1 year ago

As the underlying gRPC library only provides a blocking iterator for response streaming methods (see here), we can't really provide an async native library like that. The best option for async will likely be through the REST API, which we are targeting to add SDK support for in the future.