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
For useChat, if we need to pass the Authorization: Bearer ${token} to it, given we should not have auth code on the client side, I presume (1) either have useChat on the server side; or (2) have a customized API like /api/custom-chat on the vercel servide, that API invokes the fastapi API /fastapi/custom-chat .
But I don't see any example nor discussion about it. Please illustrate.
Feature Description
For
useChat
, if we need to pass the Authorization: Bearer ${token} to it, given we should not have auth code on the client side, I presume (1) either have useChat on the server side; or (2) have a customized API like/api/custom-chat
on the vercel servide, that API invokes the fastapi API/fastapi/custom-chat
.But I don't see any example nor discussion about it. Please illustrate.
https://github.com/vercel/ai/blob/main/examples/next-fastapi/app/(examples)/01-chat-text/page.tsx
Use Cases
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: