生成式AI项目模板 是 AI Skill Hub 本期精选AI工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
生成式AI项目模板 是一款基于 Python 开发的开源工具,专注于 installable、azureopenai、linux 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
生成式AI项目模板 是一款基于 Python 开发的开源工具,专注于 installable、azureopenai、linux 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install generative-ai-project-template
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install generative-ai-project-template
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/AmineDjeghri/generative-ai-project-template
cd generative-ai-project-template
pip install -e .
# 验证安装
python -c "import generative_ai_project_template; print('安装成功')"
# 命令行使用
generative-ai-project-template --help
# 基本用法
generative-ai-project-template input_file -o output_file
# Python 代码中调用
import generative_ai_project_template
# 示例
result = generative_ai_project_template.process("input")
print(result)
# generative-ai-project-template 配置文件示例(config.yml) app: name: "generative-ai-project-template" debug: false log_level: "INFO" # 运行时指定配置文件 generative-ai-project-template --config config.yml # 或通过环境变量配置 export GENERATIVE_AI_PROJECT_TEMPLATE_API_KEY="your-key" export GENERATIVE_AI_PROJECT_TEMPLATE_OUTPUT_DIR="./output"
<img src="./assets/icon.svg" width="200" /> <h1>Generative AI Project Template</h1>
Template for a new AI Cloud project.
Click on <kbd>Use this template</kbd> to start your own project!
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/palette/macchiato.png" width="400" />
This project is a generative ai template. It contains the following features: LLMs, information extraction, chat, rag & evaluation. It uses LLMs(local or cloud), NiceGUI (frontend) & FastAPI (backend) & Promptfoo as an evaluation and redteam framework for your AI system.
| Test LLM |
|---|
| <img src="./assets/frontend_img.png" width="500" /> |
Engineering tools:
frontend and backend).ruff to ensure the code quality & detect-secrets` to scan the secrets in the code.AI tools:
CI/CD & Maintenance tools:
.github/workflows` for GitHub (Testing the AI system, local models with Ollama and the dockerized app)github act`.github/dependabot.yml` for automatic dependency and security updatesDocumentation tools:
Upcoming features: - [ ] add RAG again - [ ] optimize caching in CI/CD - [ ] Pull requests templates - [ ] Additional MLOps templates: https://github.com/fmind/mlops-python-package - [ ] Add MLFlow - [ ] add Langfuse
.env file *(take a look at the .env.example` file)*This project is a monorepo containing two main packages:
frontend: A NiceGUI application.backend: A FastAPI application that serves the AI models and business logic.The project uses uv as a package manager and is configured as a workspace, so dependencies for both packages can be installed with a single command.
This project uses a Makefile to simplify the installation and execution process.
#### Local Installation 1. For CPU-based environment (or MacOS) To install all dependencies for both frontend and backend for a CPU environment, run:
make install-dev
2. For NVIDIA GPU (CUDA) environment If you have an NVIDIA GPU and want to use CUDA for acceleration, run:
make install-dev-cuda
This will install the CUDA-enabled version of PyTorch.
#### Using Docker The project can be fully containerized using Docker. This is the recommended way to run the application as it handles all services and networks. - The docker-compose.yml and docker-compose-cuda.yml files define the services. - To run the entire application stack using Docker Compose with CPU support:
make docker-compose
- To run with CUDA support: make docker-compose-cuda
- To rebuild and run (useful after code changes): # CPU
make docker-compose-rebuild
# CUDA
make docker-compose-cuda-rebuild
#### Using Local vs. Cloud LLMs - Local model (Ollama): - Install Ollama: make install-ollama - Ensure Ollama is running (make run-ollama can help). - Set your .env file to point to the local Ollama endpoint (copy and paste from the .env.example file). - Download a model: make download-ollama-models - Test the connection: make test-ollama - Test the connection: make test-inference-llm - Cloud model (OpenAI, Anthropic, etc.): - Update your .env file with the correct API keys and model names, following the LiteLLM naming convention. - Test the connection: make test-inference-llm
#### Running the Application Once installed (either locally or via Docker), you can run the services.
- Run Everything: The make run-app command is the easiest way to start all services, including the frontend, backend, database, and Ollama.
make run-backendmake run-frontendYou can then access: - Frontend (NiceGUI): http://localhost:8080 (or the configured port) - Backend (FastAPI): http://localhost:8000 (or the configured port). Docs http://localhost:8000/docs
Check the CONTRIBUTING.md file for more information.
| Command | Description |
|---|---|
make install-uv | Install uv package manager |
make install-dev | Install all dev dependencies (CPU) |
make install-dev-cuda | Install all dev dependencies (CUDA) |
make install-frontend | Install frontend dependencies only |
make install-backend | Install backend dependencies (CPU) |
make install-backend-cuda | Install backend dependencies (CUDA) |
make install-ollama | Install Ollama |
make download-ollama-models | Download Ollama models |
| Command | Description |
|---|---|
make docker-compose | Run docker-compose |
make docker-compose-cuda | Run docker-compose with CUDA support |
make docker-compose-rebuild | Run docker-compose with rebuild |
make deploy-doc-local | Deploy documentation locally |
make deploy-doc-gh | Deploy documentation to GitHub Pages |
该项目提供了一个开源的生成式AI项目模板,支持多种技术栈,帮助开发者快速搭建AI项目。然而,项目的文档和示例可能需要进一步完善。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,生成式AI项目模板 在AI工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | generative-ai-project-template |
| Topics | installableazureopenailinuxmacosmkdocsmlopspython |
| GitHub | https://github.com/AmineDjeghri/generative-ai-project-template |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-23 · 更新时间:2026-05-23 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。