Replies: 1 comment
-
|
This discussion was automatically locked because it has not been updated in over 30 days. If you still have questions about this topic, please ask us at community.vercel.com/ai-sdk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I found that stopping stream is currently not possible with the provided
huggingface-stream.tspackage andHf.textGenerationStreammethod.I've currently implemented by creating a custom fetch with abort controller and passing it as argument to
Hf.textGenerationStream, and adding a try-catch block tohuggingface-stream.tsto catch the user cancel operation and signal the abort controller. I'm looking for help if there are any better solutions, or happy to raise PR with these changes.Beta Was this translation helpful? Give feedback.
All reactions