langchain-ai / langchain-template-supabase
- четверг, 13 апреля 2023 г. в 00:14:26
Clone this repo
Install dependencies, including the Supabase CLI
yarnNote: If you install the Supabase CLI using a different method you have to make sure you are on version 1.49.4 as more recent versions currently suffer from an issue which prevents this from working correctly.
cp .env.example .envecho "OPENAI_API_KEY=sk-xxx" > supabase/.envnpx supabase startyarn supabase:devyarn devCreate a new project on Supabase
Create a new project on Vercel
To deploy the frontend, connect your Vercel project to your GitHub repo and push to main.
To deploy the supabase functions, first login to Supabase:
npx supabase loginThen, link your project:
npx supabase link --project-ref <project-ref>Then, deploy the functions:
yarn supabase:deployOptionally, if you're also using the Supabase Vector Store from LangcChain, you'll need to push the schema to the database:
supabase db push