This application demonstrates how to use OpenAI, Langchain, Pinecone, and NextJS to build a chatbot that can answer questions on your own documents based on augmented retrieval generation.
- Create an OpenAI account https://openai.com/
- Create a free Pinecone database at https://www.pinecone.io/
- Add a
.env
file to bothingestion/
andchatbot/
directories with the following values from OpenAI and Pinecone
OPENAI_API_KEY=""
PINECONE_API_KEY=""
PINECONE_ENVIRONMENT=""
PINECONE_INDEX_NAME=""
- Add files to
ingestion/files/*
that will be loaded into the Pinecone database. Then runcd ingestion && python app.py
to load them into your index - Run
npm install && npm run dev
in thechatbot/
directory and visitlocalhost:3000