-
Notifications
You must be signed in to change notification settings - Fork 347
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
Cancel the async openAI.chatsStream(query: query) #198
Comments
thekoc
changed the title
Cancel during openAI.chatsStream(query: query)
Cancel the async openAI.chatsStream(query: query)
Apr 22, 2024
This might be useful to you @thekoc |
I also need this feature, and would like to be able to proactively cancel stream requests. Why hasn't the developer handled this issue? |
5 tasks
I needed this feature, but nobody responded, so I implemented it myself, thanks longseespace@a290a1a . In case others need it too, I submitted a PR #214 . |
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.
Simple use case:
During the streaming, if I cancel the task manually (e.g. The stop generation button in the official ChatGPT app), I expect the stream to be stopped.
Unexpectedly, by monitoring the network activity, the generation does not stop even if the task has been cancelled.
This is due to (by my poor understanding) the underlying
StreamingSession
does not stop alongside with thetask
accordingly.Describe the solution you'd like
Use the
onTermination
method to handle cancellation from the outside task.This pull request might also help
Describe alternatives you've considered
Empty
Additional context
Empty
The text was updated successfully, but these errors were encountered: