How to stop agent midway during stream while preserving the output streamed till that point
Hi Folks,
I was wondering if its possible to stop agent stream midway while also preserving the tokens that were streamed till the time user stopped the stream.
So essentially:
I was wondering if its possible to stop agent stream midway while also preserving the tokens that were streamed till the time user stopped the stream.
So essentially:
- User sends a message.
- Lets say agent streams about 200 tokens and user clicks on stop.
- Agent stops generating and we save these 200 tokens to the memory.