This is a simple demo using Langchain, OpenAI and Chroma.
To run this demo, you need to have:
- A Chroma client using Docker - docs.trychroma.com.
- An OpenAI account. If you don't have one, you can sign up for free at openai.com.
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.
- Create a Chroma client using Docker
git clone git@github.com:chroma-core/chroma.git
cd chroma
docker-compose up -d --build
- Clone this repository
git clone https://github.com/e-roy/langchain-chatbot-demo.git
- Install dependencies
cd langchain-chatbot-demo
yarn install
- Create a
.env
file in the root directory of the project and add your API keys:
OPENAI_API_KEY=...
yarn dev