https://github.com/supabase-community/langchain-chatbot-demo
Example of building a chatbot with Langchain and Supabase Vector.
https://github.com/supabase-community/langchain-chatbot-demo
ai chatbots embeddings langchain langchain-js openai supabase vector-database
Last synced: 4 months ago
JSON representation
Example of building a chatbot with Langchain and Supabase Vector.
- Host: GitHub
- URL: https://github.com/supabase-community/langchain-chatbot-demo
- Owner: supabase-community
- Fork: true (pinecone-io/chatbot-demo)
- Created: 2023-06-10T07:53:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T04:53:41.000Z (11 months ago)
- Last Synced: 2024-11-26T16:30:46.562Z (5 months ago)
- Topics: ai, chatbots, embeddings, langchain, langchain-js, openai, supabase, vector-database
- Language: TypeScript
- Homepage: https://supabase.com/docs/guides/ai/langchain
- Size: 52.7 KB
- Stars: 90
- Watchers: 4
- Forks: 44
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - supabase-community/langchain-chatbot-demo - Example of building a chatbot with Langchain and Supabase Vector. (TypeScript)
README
# Supabase Langchain Chatbot Demo
To run this demo, you need to have:
1. An OpenAI account. If you don't have one, you can sign up for free at [openai.com](https://www.openai.com).
2. [Optional] A [Supabase account](https://app.supabase.io/register). Only needed if you want to use the hosted Supabase service.## Setup
1. Clone this repository
```bash
git clone [email protected]:thorwebdev/langchain-chatbot-demo.git
```2. Install dependencies
```bash
cd langchain-chatbot-demo
npm install
```3. Start Supabase
```bash
supabase start
```5. Create a `.env` file in the root directory of the project and add your API keys:
```
OPENAI_API_KEY=...
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
API_ROOT="http://localhost:3000"
```When running Supabase locally you can run `supabase status` to get the local credentials.
6. [Optional] generate types (only needed after making db schema schanges)
```bash
npx supabase gen types typescript --local --schema public > src/types/supabase.ts
```## Start the development server
```bash
npm run dev
```