A simple chat bot used to chat with document built using Langchain, OpenAI and Supabase.
- Chat with the bot about scrimba courses
- Conversation history is saved locally
- Uses OpenAI to generate responses, embeddings and retrieve documents
- Uses Supabase as vector storage
- Node.js
- pnpm
- Supabase
- OpenAI
- Langchain
- Clone the repository and go to the project directory
git clone <repo-url>
cd langchain-chat
- Install dependencies
pnpm install
- Create a
.env
file in the root directory and add the following environment variables
SUPABASE_API_KEY=your-supabase-api-key
SUPABASE_URL=your-supabase-url
OPENAI_API_KEY=your-openai-api-key
- Have access to OpenAI API
- Have access to Supabase and create a new project and add query from
src/db/match_documents.sql
to create thedocuments
table - Load document, generate embeddings and save embeddings to Supabase vector storage by running:
pnpm load
- Open live server from index.html
v 0.1.0
- Create a chatbot that can chat about scrimba courses
- Save conversation history locally
- Use OpenAI to generate responses
- Use OpenAI to generate embeddings
- Use OpenAI to retrieve documents
- Use Supabase as vector storage
v 0.2.0
- Make file input for users to upload their own documents
- Update prompts to be suited to any document upload
- Update the chatbot to be able to chat about any document uploaded
- Update UI
- This project was developed with the help of materials from The Official Langchain Course from Scrimba.