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
We already have callbacks like onFinish and onChunk in the useChat hook, but it would be great to have the same callbacks available in the chat function as well.
Currently, I’m using StreamProcessor to capture the final message so I can persist it to the database:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We already have callbacks like
onFinishandonChunkin theuseChathook, but it would be great to have the same callbacks available in thechatfunction as well.Currently, I’m using
StreamProcessorto capture the final message so I can persist it to the database:The problem is that
onStreamEndis not called when the chat is aborted by the client usingstop()and I'm not be able to capture the final message.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions