A simple Retrieval-Augmented Generation (RAG) chatbot that lets you chat with your documents.
- Upload PDF and text documents
- Process documents into searchable chunks
- Chat with your documents using GPT-4o-mini
- Select which documents to include in your knowledge base
- Python 3.7+
- OpenAI API key
- Clone the repository
- Create a virtual environment (optional):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt - Create a
.envfile with your OpenAI API key (see.env.example)
Run the application:
python main.py
The Streamlit interface will open in your web browser. From there:
- Enter your OpenAI API key in the sidebar
- Upload documents
- Process the documents
- Select which documents to include in the RAG system
- Start chatting with your documents!
main.py: Entry point for the applicationcomponents/: Core application modulesapp.py: Streamlit user interfacedocument.py: Document processing and vectorizationchat.py: RAG implementation with LangChain
documents/: Storage for uploaded and processed documents