Spaces:
Running
Running
File size: 1,604 Bytes
640b1c8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# 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 management
- `src/`: Main application source code
- `tests/`: Unit and integration tests
- `data/`: Document storage and ingestion
## Prerequisites
- Python 3.9+
- pip
- (Optional) Virtual environment
## Installation
1. Clone the repository
```bash
git clone https://your-repo-url.git
cd rag-chatbot
```
2. Create a virtual environment
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
3. Install dependencies
```bash
pip install -r requirements.txt
```
4. Set up environment variables
```bash
cp .env.example .env
# Edit .env with your credentials
```
## Configuration
### Environment Variables
- `OPENAI_API_KEY`: OpenAI API key
- `OLLAMA_BASE_URL`: Ollama server URL
- `EMBEDDING_MODEL`: Hugging Face embedding model
- `CHROMA_PATH`: Vector store persistence path
- `DEBUG`: Enable debug mode
## Running the Application
### Development Server
```bash
uvicorn src.main:app --reload
```
### Production Deployment
```bash
gunicorn -w 4 -k uvicorn.workers.UvicornWorker src.main:app
```
## Testing
```bash
pytest tests/
```
## Features
- Multiple LLM Provider Support
- Retrieval Augmented Generation
- Document Ingestion
- Flexible Configuration
- FastAPI Backend
## Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request |