Bug in Vercel AI SDK 3.1.1
Unanswered
Bishal Saha posted this in #help-forum
The code for example is wrong or it has bugs, getting error
Unhandled Runtime Error
Error: Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.
Source
src/app/page.tsx (31:61) @ onClick
29 | <button
30 | onClick={async () => {
31 | const { messages } = await continueConversation([
^
32 | ...conversation,
33 | { role: "user", content: input },
34 | ]);
https://sdk.vercel.ai/examples/next-app/tools/render-interface-during-function-call
Unhandled Runtime Error
Error: Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.
Source
src/app/page.tsx (31:61) @ onClick
29 | <button
30 | onClick={async () => {
31 | const { messages } = await continueConversation([
^
32 | ...conversation,
33 | { role: "user", content: input },
34 | ]);
https://sdk.vercel.ai/examples/next-app/tools/render-interface-during-function-call