supabase-community / vercel-ai-chatbot

A full-featured, Supabaseified Next.js AI chatbot built by Vercel Labs & Supabase
https://github.com/thorwebdev/vercel-ai-chatbot/pull/1
Other
549 stars 83 forks source link

Chat persistence does not work #16

Open raivatshah opened 11 months ago

raivatshah commented 11 months ago

Bug report

I just setup the basic repo, but I realised that the chat history isn't being saved. Upon checking, I realise that the 'chats' table doesn't exist in the supabase db. What could go wrong?

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Setup repo as per instructions
  2. Type in a chat
  3. Check history and DB
raivatshah commented 11 months ago

I think this might have to do with the auth for the repo out of the box. After I clicked deploy with vercel, for all my sign in requests, I get { "message": "No API key found in request", "hint": "Noapikeyrequest header or url param was found." }

raivatshah commented 11 months ago

Nvm, turns out that the auth link in supabase settings needs to have https://. See this stackoverflow discussion.

raivatshah commented 11 months ago

But the chat issue still persists

rishadfb commented 4 months ago

I was able to fix the chat history persistence by migrating to SSR from auth helpers.

Once I wrap up my project, I'll post a PR for this.