-
I would like to save all messages into database and restore the history including tool steps to exactly before user left. Sample code: await streamText({
message: converToCoremessage(message),
...
async onFinish({responseMessages) {
await saveChat({
chatId: params.id
response: responseMessages
})
}
}) const history = getHistory(params.id);
const {messages} = useChat({
initialMessages: history
}) |
Beta Was this translation helpful? Give feedback.
Answered by
joel611
Sep 27, 2024
Replies: 1 comment
-
oh sorry, i just found solution from other thread. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joel611
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oh sorry, i just found solution from other thread.
#2013 (reply in thread)