fal-ai/fal-js

feature request: public way to stop fal.run, fal.subscribe

Closed this issue · 2 comments

First of all, I'm a big fan of fal.ai and thank you for your service!
My question is that, is there a way to stop ongoing fal request using something like AbortController or something else?

I found your codes use AbortController to stop streaming, but it's private and only for streaming.
github Link

I want to stop fal.run or fal.subscribe using AbortController or something else.
It's okay that fal actually creates images whether stop is done or not, and I don't mind whether it's billable after stop.
I just want my server does not wait until fal gives me result after I stop fal request.

Thank you!

Hey @ZeroCho, this is a planned feature. We're working on client 1.0.0 release and it will allow AbortController being passed. More news coming very soon.

Thanks for the feedback :)

Hey @ZeroCho

As of @fal-ai/client version 1.2.0 you can pass an AbortSignal to any of the client APIs. Let me know if you have any issues or further feedback!