- Python 3.11
- Poetry
- Docker and Docker Compose
This project includes a comprehensive Makefile that simplifies common development tasks. To see all available commands:
make help- Create .env file:
cp .env.example .envAdd your API keys to the .env file. Open the file in a text editor and add the required variables in the format KEY=value. For example:
CORE_OPENAI_API_KEY=your_openai_api_key_here
CORE_GOOGLE_API_KEY=your_google_api_key_here
CORE_GITHUB_API_KEY=your_github_api_key_here- Build and start the application:
make buildThis command will:
- Automatically copy
.env.exampleto.envif it doesn't exist - Build and start the application using Docker Compose
Important: After the .env file is created, you need to add your API keys for the chosen model provider. Edit the .env file and add the required API keys for your selected AI provider (OpenAI, Google, etc.).
- Stop the application:
make stop- Access the API documentation:
- Swagger UI: http://localhost:5000/docs
- Prefect UI: http://localhost:4200
- UI RAG Application: http://localhost:5000
- Install all dependencies and setup pre-commit hooks:
make installThis command will:
- Install all project dependencies including development and test dependencies
- Set up pre-commit hooks for code quality
| Command | Description |
|---|---|
make help |
Show all available commands with descriptions |
make install |
Install dependencies and setup pre-commit hooks |
make format |
Format code using black and isort |
make check |
Run code quality checks with ruff and pyright |
make test |
Run tests with coverage reporting |
make build |
Build and start the application with Docker Compose |
make stop |
Stop the Docker Compose services |
- Initial setup:
make install- Before committing code:
make format # Format your code
make check # Run linting and type checks
make test # Run tests- Build and test the application:
make build # Start the application
# Test your changes
make stop # Stop when doneThe RAG (Retrieval-Augmented Generation) system provides intelligent document processing and chat capabilities:
- Document Upload: Upload documents through the
/documentendpoint for processing and indexing - Document Processing: Documents are automatically processed, chunked, and stored in a vector database (ChromaDB)
- Streaming Responses: Real-time streaming chat responses using FastAPI's StreamingResponse
- AI Integration: Powered by PydanticAI with support for multiple AI providers (OpenAI, Google)
- Session Management: Persistent chat sessions for better user experience
- Health Monitoring: Built-in health checks for system monitoring
- Health Check:
GET /health/liveness- System liveness health statusGET /health/readiness- System readiness health status
- Document Management:
POST /document- Upload and process documentsGET /document/list- Get all documentsGET /document/{document_id}- Get a specific documentGET /document/{document_id}/session/list- Get all sessions for a specific documentDELETE /document/{document_id}- Delete a specific document
- Chat Streaming:
POST /chat/stream- Stream chat responses
- Session Management:
POST /session- Create chat sessionsDELETE /session/{session_id}- Delete a specific sessionGET /session/{session_id}/message/list- Get all messages for a specific session
- Web Interface:
GET /- Main application interfaceGET /chat/{document_id}- Chat interface for specific documents