-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat stream controller #324
Comments
This would be cool and a well used feature I think, definitely open to a PR on it |
As per discussion in the past (#265), one way to abort is to raise an exception from the proc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I am not seeing a way to signal to the stream that I want to abort, for the cases of when a response is getting too long, or is wrong and I want to start over.
In the node package for the OpenAI API, they expose a
controller
object which allows you to abort the stream midway through.Describe the solution you'd like
I would like that calling the
chat
method on a client instance would return a stream controller so that I can abort the stream if need be. Perhaps this is already possible with how you built it, but I did not have success attempting to use it. If this is already possible, would you please update the readme with instructions?Example usage:
Additional context
Node.js implementation:
Thank you for providing and maintaining this Gem 🙏
The text was updated successfully, but these errors were encountered: