Starterkit for OpenAI chat client based on your own content. Main ingredients:
- Next.js
- Supabase + pgvector
- @7-docs/edge
- TypeScript
- Tailwind
- Use this template
- Clone your new repo
npm install
- Prepare vector database
- Ingest content
cp .env.example .env.local
and paste your tokens:OPENAI_API_KEY
,SUPABASE_URL
,SUPABASE_API_KEY
The following commands are using my-namespace
as set in config.ts and ingest content from the
reactjs/react.dev
repository. By all means, you're encouraged to change them to something more original.
Create a Supabase account if you don't have one already.
The following command does not actually do anything. Instead, it gives you an all-batteries-included SQL query to run in your Supabase project area's SQL Editor:
npx 7d supabase-create-table --namespace my-namespace
npx 7d ingest \
--source github \
--repo reactjs/react.dev \
--files 'src/content/reference/react/*.md' \
--files 'src/content/reference/react-dom/*.md' \
--files 'src/content/learn/*.md' \
--namespace my-namespace
npm run dev
This application can be deployed on platforms with support for Next.js + edge functions. Examples:
Make sure to add the environment variables to the platform first.