You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
question on expected behaviour: do you want to stop the stream midway on the server side, as well as delete the full message itself? or do you expect the message midstream to be persisted? I suspect the former, but checking with you.
persist the half streamed message? not sure if that's the desired behaviour, would be confusing. I suspect it's better to just reset to the state before the message was sent.
it's also a bit tricky because the response might be changing previous messages as well, especially for human in the loop stuff.
useAgentChat
proxies the underlyinguseChat
'sstop
function, but does not reflect on the server.I know this, because if i refresh after stopping the stream, the message appears.
To workaround, I had to create an
AbortController
and pass theAbortSignal
through tostreamText
:Then, I call my own API on the
Agent
to trigger the Abort Signal.The final barrier I haven't yet gotten over is how to make sure the final message parts are persisted.
Not sure if I am approaching this in the right way.
The text was updated successfully, but these errors were encountered: