Asked about Streaming from the model to the screen
What happens when a user cancels a streamed answer?
An answer that works
The server should notice the client disconnect and cancel the upstream request, so generation stops. Otherwise the model keeps producing tokens you pay for and nobody reads.
Reading an answer is not being able to give one. The section that teaches this is Streaming from the model to the screen, 4 hours of Streaming responses.
Learn this properlyAlso asked about Streaming responses