You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched to see if a similar issue already exists.
Is your feature request related to a problem? Please describe.
The streaming API for the @gradio/client isn't really that nice. I think we should switch to an async iterator, we would go from this:
constapp=Client.create();constjob=app.submit("/endpoint",body)job.on("data",data=>{// do something with data})job.on("status",status=>{// do something with status})
fits into a linear await flow better which is the standard in JS now
Other thoughts
@freddyaboulton@abidlabs Should the python client follow a similar pattern and return an iterator for streams instead? I've seen this pattern quite a bit recently when working with streams and found it really nice.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The streaming API for the
@gradio/client
isn't really that nice. I think we should switch to an async iterator, we would go from this:To this:
Benefits:
await
flow better which is the standard in JS nowOther thoughts
@freddyaboulton @abidlabs Should the python client follow a similar pattern and return an iterator for streams instead? I've seen this pattern quite a bit recently when working with streams and found it really nice.
The text was updated successfully, but these errors were encountered: