OpenAI & LangChain chatbot with custom context knowledge base

To learn how to use this repo watch this tutorial video

This chatbot uses Pinecone index to retrieve relevant information from a custom knowledge base. Learn how to create a Pinecone index in this tutorial

Tech stack: LangChain, Pinecone, Typescript, Openai, Next.js, Tailwind

Getting Started

  1. Clone the repo
git clone [github https url]
  1. Install packages
npm install
  1. Set up your .env file
  • Change .env.example into .env and fill the neccessary keys.
  • For OPENAI API key visit openai
  • For Pinecone API key and environment and index names visit pinecone and create your index
  1. Run the development server:
npm run dev

Deploy on Vercel

!! If your Vercel app throws back a timeout error when deployed, the response is taking more than 5s, which is the limit of a free Vercel plan.

The easiest way to deploy your Next.js app is to use the Vercel Platform

Check out Next.js deployment documentation for more details.