This repository contains a Jupyter notebook demonstrating how to perform question answering over documents using LangChain and Chroma DB.For a demonstration of how to perform question answering over documents using Chroma and LangChain, refer to this notebook. For utilizing a persistent database with Chroma and LangChain, see this notebook.
- Install the required packages using
pip install langchain langchain-openai chromadb llama-index.
- Set Up Environment Variables:
To authenticate your API requests, you need to set up your environment variables for your OpenAI and Langchain API keys. Replace "API_KEY_HERE" with your actual API keys:
OPEN_AI_API_KEY = "API_KEY_HERE"
LANGCHAIN_API_KEY = "API_KEY_HERE"
- Ensure you have a text file (input.txt) with the documents you want to use for question answering.