Spaces:
Running
Running
RAG Chatbot Application
Project Overview
A modular Retrieval Augmented Generation (RAG) chatbot application built with FastAPI, supporting multiple LLM providers and embedding models.
Project Structure
config/
: Configuration managementsrc/
: Main application source codetests/
: Unit and integration testsdata/
: Document storage and ingestion
Prerequisites
- Python 3.9+
- pip
- (Optional) Virtual environment
Installation
- Clone the repository
git clone https://your-repo-url.git
cd rag-chatbot
- Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install dependencies
pip install -r requirements.txt
- Set up environment variables
cp .env.example .env
# Edit .env with your credentials
Configuration
Environment Variables
OPENAI_API_KEY
: OpenAI API keyOLLAMA_BASE_URL
: Ollama server URLEMBEDDING_MODEL
: Hugging Face embedding modelCHROMA_PATH
: Vector store persistence pathDEBUG
: Enable debug mode
Running the Application
Development Server
uvicorn src.main:app --reload
Production Deployment
gunicorn -w 4 -k uvicorn.workers.UvicornWorker src.main:app
Testing
pytest tests/
Features
- Multiple LLM Provider Support
- Retrieval Augmented Generation
- Document Ingestion
- Flexible Configuration
- FastAPI Backend
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request