supabase-community / chatgpt-your-files

Production-ready MVP for securely chatting with your documents using pgvector
https://youtu.be/ibzlEQmgPPY
362 stars 126 forks source link

Tutorial branches are missing Edge Functions updates? #28

Open duggan opened 7 months ago

duggan commented 7 months ago

Bug report

Describe the bug

Howdy, the tutorial seems to be in an inbetween state, where Deno is expected in some parts, but the new Edge Functions runtime is expected in others.

The upshot is that when running through the tutorial as described (i.e., checking out step-1, step-2, etc.) the embeddings step no longer works (locally at least), producing an error about a missing reference to Supabase:

ReferenceError: Supabase is not defined
    at file:///home/deno/functions/embed/index.ts:4:15

I'm not 100% convinced on the root cause, I'm still working through things, will update if I get a clearer picture. Or close if I've just done something incorrectly along the way!

To Reproduce

Run through the tutorial up to the embeddings portion.

Expected behavior

Embeddings should be triggered on upload.

Screenshots

N/A

System information

Additional context

Can work around it by skipping the tutorial and run from the main branch, but miss that muscle memory building, step by step stuff :)

gregnr commented 5 months ago

Hey @duggan thanks for the issue and apologies for the delay. The issue you're having with tutorial branches has been one of my big challenges from the beginning 😅 ie. as we continue to make improvements and new PRs are merged, we don't have a good/easy way of going back and recreating each step with the improvements in place (apart from rewriting git history, which will break a lot of people's repos).

The way I've managed this is to be diligent about adding notes to each step in the README within the main branch every time there is a new change (example). The Supabase.ai API for example is a relatively new improvement that we introduced after all the tags were created, so you'll only see that change on the latest main branch but not previous steps.

Hope this makes sense. If you find the tags are creating problems you may have better luck by working off the main branch and following the README steps directly, which will be up-to-date. Let me know if have any other thoughts/questions.