How can I send custom data like systemMessage with useChat #532
Replies: 2 comments 2 replies
-
|
Why not just check if messages.length == 0 and add it to initialmessages if it is? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
This discussion was automatically locked because it has not been updated in over 30 days. If you still have questions about this topic, please ask us at community.vercel.com/ai-sdk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I found a solution as below, if you have a better suggestion you can share it.
// route.ts
Beta Was this translation helpful? Give feedback.
All reactions