How to Properly Abort Streaming Requests and Notify the Backend?
Unanswered
Scottish Fold posted this in #help-forum
Scottish FoldOP
Hello everyone!
I need help implementing a stop logic for message generation, similar to how ChatGPT handles it. In my case, I need to abort a request, and the backend team mentioned that they will handle stopping the streaming on their side. From what I understand, ChatGPT uses a separate endpoint for such tasks.
Here’s the challenge: I know how to abort requests that haven’t received a response yet. However, if the response has already started streaming, how can I properly abort it and ensure the backend is notified to stop the process?
Any advice or examples would be greatly appreciated! Thank you!
I need help implementing a stop logic for message generation, similar to how ChatGPT handles it. In my case, I need to abort a request, and the backend team mentioned that they will handle stopping the streaming on their side. From what I understand, ChatGPT uses a separate endpoint for such tasks.
Here’s the challenge: I know how to abort requests that haven’t received a response yet. However, if the response has already started streaming, how can I properly abort it and ensure the backend is notified to stop the process?
Any advice or examples would be greatly appreciated! Thank you!