Replies: 1 comment 1 reply
-
Your problem is you are putting the onFinish callback inside the "headers" key which is not correct.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to store chat messages locally using IndexedDB. The AI SDK provides
onFinish
in/api/chat -> streamText
, but that is server-based. I need to store messages locally. I tried usingonFinish
in useChat(), but it didn't trigger the console log.Here is my code:
Has anyone successfully used onFinish on the client side to store messages locally? Any insights or solutions would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions