Production-oriented starter template to build Generative AI projects instantly, with best practices and structured modules.
- FastAPI server with an OpenAI-compatible chat completions endpoint
- LangChain + OpenAI-compatible clients
- Optional RAG utilities (Vector Database, embeddings, and reranking)
- Sensible defaults: logging, env loading, lazy initialization (no import-time crashes)
- Docker Compose: Complete containerized deployment with Milvus vector database
my_project/ # Main application package
__init__.py # Package initialization
api_server.py # FastAPI server with OpenAI-compatible endpoints
settings.py # Configuration and environment variable loading
utils/ # Utility modules
cache.py # Caching utilities
llm.py # LLM client and interaction utilities
logger.py # Logging configuration
rag/ # Retrieval-Augmented Generation utilities
converter_utils.py # Document conversion utilities
ingestion.py # Data ingestion for vector database
llm_rag_utils.py # RAG-specific LLM utilities
retrieval_utils.py # Vector retrieval and reranking
docs/ # Documentation files
tests/ # Unit and integration tests
test_api_server.py # Tests for the API server
examples/ # Example usage scripts
call_llm.py # Example of calling LLMs
host_models.py # Example of hosting models
notebooks/ # Jupyter notebooks for experimentation
experiment.ipynb # Experimental notebook
Dockerfile # Docker container configuration
docker-compose.yml # Multi-service container orchestration
.env.example # Environment variables template
LICENSE # Project license
pyproject.toml # Python project configuration and dependencies
README.md # This file - project documentation
assets/ # Static assets (images, etc.)
See USAGE.md for detailed usage instructions, API documentation, and examples.
Detailed documentation for each file is available in the docs/ folder:
docs/Dockerfile.md- Container configurationdocs/pyproject.toml.md- Project dependenciesdocs/my_project_api_server.py.md- API server details- And more...
For production:
- Use external managed databases instead of local containers
- Configure proper secrets management
- Set up monitoring and logging
- Configure load balancing
- Use production-grade reverse proxy (nginx, traefik)
Contributions are encouraged! Please open issues and submit pull requests for any features, bug fixes, or improvements.
This project is licensed under the CC0 License to promote usage of the template. Refer the LICENSE file for details.
Please ⭐ star the repository if you found it useful!

