e-roy / langchain-chatbot-demo

let's you chat with website. crawls a website, embeds to vectors, stores to Chroma.

Home Page:https://langchain-chatbot-demo.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Langchain Chatbot Demo

This is a simple demo using Langchain, OpenAI and Chroma.

To run this demo, you need to have:

  1. A Chroma client using Docker - docs.trychroma.com.
  2. An OpenAI account. If you don't have one, you can sign up for free at openai.com.

What it does

A simple chatbot to interact with any website that you enter in the top input field. In local development only.

After you enter a URL to crawl:

  • if website-collection exists, is deleted. This is so you are only having a conversation with info from one site.
  • url entered and urls found in crawl will be broken up into chunks and embeddeding to store in Chroma vector db as website-collection
  • chat is now ready to ask questions about the site.

Setup

  1. Create a Chroma client using Docker
git clone git@github.com:chroma-core/chroma.git
cd chroma
docker-compose up -d --build
  1. Clone this repository
git clone https://github.com/e-roy/langchain-chatbot-demo.git
  1. Install dependencies
cd langchain-chatbot-demo
yarn install
  1. Create a .env file in the root directory of the project and add your API keys:
OPENAI_API_KEY=...

Start the development server

yarn dev

About

let's you chat with website. crawls a website, embeds to vectors, stores to Chroma.

https://langchain-chatbot-demo.vercel.app


Languages

Language:TypeScript 86.8%Language:CSS 10.2%Language:JavaScript 2.9%