docs: make Chinese README the default
Test All Applications / Test repository tooling (push) Has been cancelled
Test All Applications / Test FastAPI (push) Has been cancelled
Test All Applications / Test Next.js (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 10:15:37 +00:00
parent 76a7364031
commit d691390d90
+278 -278
View File
@@ -1,10 +1,16 @@
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/presenton/presenton) · [上游 README](https://github.com/presenton/presenton/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
<p align="center">
<img src="./readme_assets/images/logo.png" alt="Presenton" />
</p>
<p align="center">
<a href="https://presenton.ai/download"><strong>Quickstart</strong></a> &middot;
<a href="https://docs.presenton.ai/"><strong>Docs</strong></a> &middot;
<a href="https://presenton.ai/download"><strong>快速入门</strong></a> &middot;
<a href="https://docs.presenton.ai/"><strong>文档</strong></a> &middot;
<a href="https://www.youtube.com/@presentonai"><strong>Youtube</strong></a> &middot;
<a href="https://discord.gg/9ZsKKxudNE"><strong>Discord</strong></a>
</p>
@@ -19,28 +25,28 @@
<a href="https://trendshift.io/repositories/18582?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-18582" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/18582" alt="presenton%2Fpresenton | Trendshift" width="250" height="55" /></a>
</p>
# Open-Source AI Presentation Generator and API (Gamma, Canva, Beautiful AI, Decktopus, Presentations AI Alternative)
# 开源 AI 演示文稿生成器与 APIGammaCanvaBeautiful AIDecktopusPresentations AI 的替代方案)
Discover what Presenton can do from AI-powered presentation generation to editing, exporting, and flexible model providers.
从 AI 驱动的演示文稿生成,到编辑、导出和灵活的模型提供商,探索 Presenton 能做什么。
[Watch Presenton in Action](https://github.com/user-attachments/assets/93e541dc-8487-4dcf-a9a0-95ad5ca94453)
[观看 Presenton 实操演示](https://github.com/user-attachments/assets/93e541dc-8487-4dcf-a9a0-95ad5ca94453)
### ✨ Why Presenton
### ✨ 为什么选择 Presenton
No SaaS lock-in · No forced subscriptions · Full control over models and data
SaaS 锁定 · 无强制订阅 · 对模型与数据拥有完全控制权
What makes Presenton different?
Presenton 有何不同?
- Use Fully **self-hosted** in Web through [Docker Package](https://docs.presenton.ai/v3/get-started/quickstart)
- Or Download [Desktop App](https://presenton.ai/download) (Mac, Windows & Linux)
- Works with Ollama, LM Studio, OpenAI, Gemini, Vertex AI, Azure OpenAI, Amazon Bedrock, Fireworks, Together AI, Anthropic, or any other OpenAI compatible providers
- Comes with AI Presentation Generation API
- Fully open-source (Apache 2.0)
- Works with your own design/templates
- **Fully editable PPTX export**
- 通过 [Docker Package](https://docs.presenton.ai/v3/get-started/quickstart) 在 Web 端实现完全**自托管(self-hosted**
- 或下载 [Desktop App](https://presenton.ai/download)MacWindows Linux
- 兼容 OllamaLM StudioOpenAIGeminiVertex AIAzure OpenAIAmazon BedrockFireworksTogether AIAnthropic,或任何其他 OpenAI 兼容提供商
- 内置 AI 演示文稿生成 API
- 完全开源(Apache 2.0
- 支持使用你自己的设计/模板
- **可完全编辑的 PPTX 导出**
> [!TIP]
> **Star us!** Ashows your support and encourages us to keep building! 😇
> **给我们点个 Star** 一颗代表你的支持,也会激励我们持续构建!😇
<p align="center">
<img src="./readme_assets/images/banner_bg.gif" alt="Presenton" />
@@ -48,63 +54,63 @@ What makes Presenton different?
#
### 🎛 Features
### 🎛 功能特性
<p align="center">
<img src="./readme_assets/images/features.png" alt="Presenton Features" />
<img src="./readme_assets/images/features.png" alt="Presenton 功能特性" />
</p>
<p align="center">
<img src="./readme_assets/images/chatgpt-2-1.png" alt="Create stunning presentations with your existing ChatGPT subscription — secure and private, instant access, no API keys" />
<img src="./readme_assets/images/chatgpt-2-1.png" alt="使用现有 ChatGPT 订阅创建精美演示文稿 — 安全私密、即时访问、无需 API 密钥" />
</p>
#
### 💻 Presenton Desktop
Create AI-powered presentations using your own model provider (BYOK) or run everything locally on your own machine for full control and data privacy.
使用你自己的模型提供商(BYOK,Bring Your Own Key)创建 AI 驱动的演示文稿,或在本地机器上完整运行一切,以获得完全控制与数据隐私。
<p align="center">
<a href="https://presenton.ai/download">
<img src="./readme_assets/images/banner.png" alt="Cloud deployment" />
<img src="./readme_assets/images/banner.png" alt="云端部署" />
</a>
</p>
**Available Platforms**
**支持平台**
<table>
<tr>
<th align="left">Platform</th>
<th align="left">Architecture</th>
<th align="left">Package</th>
<th align="left">Download</th>
<th align="left">平台</th>
<th align="left">架构</th>
<th align="left">安装包</th>
<th align="left">下载</th>
</tr>
<tr>
<td><b>macOS</b></td>
<td>Apple Silicon / Intel</td>
<td><code>.dmg</code></td>
<td><a href="https://presenton.ai/download">Download ↗</a></td>
<td><a href="https://presenton.ai/download">下载 ↗</a></td>
</tr>
<tr>
<td><b>Windows</b></td>
<td>x64</td>
<td><code>.exe</code></td>
<td><a href="https://presenton.ai/download">Download ↗</a></td>
<td><a href="https://presenton.ai/download">下载 ↗</a></td>
</tr>
<tr>
<td><b>Linux</b></td>
<td>x64</td>
<td> <code>.deb</code></td>
<td><a href="https://presenton.ai/download">Download ↗</a></td>
<td><a href="https://presenton.ai/download">下载 ↗</a></td>
</tr>
</table>
**Deploy to Cloud Providers**
**部署到云服务商**
<div style="display:flex; gap:12px; align-items:center;">
<a href="https://railway.com/deploy/presenton-ai-presentations">
@@ -125,31 +131,31 @@ Create AI-powered presentations using your own model provider (BYOK) or run ever
#
Presenton gives you complete control over your AI presentation workflow. Choose your models, customize your experience, and keep your data private.
Presenton 让你对 AI 演示文稿工作流拥有完全控制权。选择你的模型、自定义体验,并保持数据私密。
- Custom Templates & Themes — Create unlimited presentation designs with HTML and Tailwind CSS
- AI Template Generation — Create presentation templates from existing Powerpoint documents.
- Flexible Generation — Build presentations from prompts or uploaded documents
- Export Ready — Save as PowerPoint (PPTX) and PDF with professional formatting
- Built-In MCP Server — Generate presentations over Model Context Protocol
- Bring Your Own Key — Use your own API keys for OpenAI, Google Gemini, Vertex AI, Azure OpenAI, Anthropic Claude, or any compatible provider. Only pay for what you use, no hidden fees or subscriptions.
- Ollama Integration — Run open-source models locally with full privacy
- OpenAI API Compatible — Connect to any OpenAI-compatible endpoint with your own models
- Multi-Provider Support — Mix and match text and image generation providers
- Versatile Image Generation — Choose from DALL-E 3, Gemini Flash, Pexels, or Pixabay
- Rich Media Support — Icons, charts, and custom graphics for professional presentations
- Runs Locally — All processing happens on your device, no cloud dependencies
- API Deployment — Host as your own API service for your team
- Fully Open-Source — Apache 2.0 licensed, inspect, modify, and contribute
- Docker Ready — One-command deployment with GPU support for local models
- Electron Desktop App — Run Presenton as a native desktop application on Windows, macOS, and Linux (no browser required)
- Sign in with ChatGPT — Use your free or paid ChatGPT account to sign in and start creating presentations instantly — no separate API key required
- 自定义模板与主题 — 使用 HTML Tailwind CSS 创建无限种演示文稿设计
- AI 模板生成 — 从现有 Powerpoint 文档创建演示文稿模板
- 灵活生成 — 通过提示词或上传文档构建演示文稿
- 随时导出 — 以专业格式保存为 PowerPointPPTX)和 PDF
- 内置 MCP Server — 通过 Model Context Protocol 生成演示文稿
- Bring Your Own Key — 使用你自己的 API 密钥连接 OpenAIGoogle GeminiVertex AIAzure OpenAIAnthropic Claude 或任何兼容提供商。只为实际使用付费,无隐藏费用或订阅
- Ollama 集成 — 在本地运行开源模型,享有完全隐私
- OpenAI API 兼容 — 使用你自己的模型连接任何 OpenAI 兼容端点
- 多提供商支持 — 自由组合文本与图像生成提供商
- 多样化图像生成 — 可选 DALL-E 3Gemini FlashPexels Pixabay
- 丰富媒体支持 — 图标、图表和自定义图形,打造专业演示文稿
- 本地运行 — 所有处理都在你的设备上完成,无云端依赖
- API 部署 — 作为团队自有的 API 服务托管
- 完全开源 — Apache 2.0 许可,可审查、修改与贡献
- Docker 就绪 — 一条命令即可部署,支持 GPU 以运行本地模型
- Electron 桌面应用 — 在 WindowsmacOS Linux 上以原生桌面应用运行 Presenton(无需浏览器)
- 使用 ChatGPT 登录 — 使用免费或付费 ChatGPT 账户登录,即刻开始创建演示文稿 — 无需单独的 API 密钥
#
### ☁️ Presenton Cloud
Run Presenton directly in your browser — no installation, no setup required. Start creating presentations instantly from anywhere.
直接在浏览器中运行 Presenton — 无需安装、无需配置。随时随地即刻开始创建演示文稿。
<p align="center">
<a href="https://presenton.ai">
@@ -159,218 +165,213 @@ Run Presenton directly in your browser — no installation, no setup required. S
#
### ⚡ Running Presenton
### ⚡ 运行 Presenton
<p>
You can run Presenton in two ways:
<strong>Docker</strong> for a one-command setup without installing a local dev
stack, or the <strong>Electron desktop app</strong> for a native app
experience (ideal for development or offline use).
你可以通过两种方式运行 Presenton:
使用 <strong>Docker</strong> 一条命令完成搭建,无需安装本地开发
环境栈;或使用 <strong>Electron 桌面应用</strong> 获得原生应用
体验(适合开发或离线使用)。
</p>
**Option 1: Electron (Desktop App)**
**选项 1Electron(桌面应用)**
<p>
Run Presenton as a native desktop application. LLM and image provider
(API keys, etc.) can be configured in the app. The same environment variables
used for Docker apply when running the bundled backend.
以原生桌面应用运行 Presenton。可在应用中配置 LLM 与图像提供商
API 密钥等)。运行捆绑后端时,适用与 Docker 相同的环境变量。
</p>
<p>
<strong>Prerequisites:</strong> Node.js (LTS), npm, Python 3.11, and
<strong>前置要求:</strong>Node.jsLTS)、npmPython 3.11,以及
<a href="https://docs.astral.sh/uv/">uv</a>
(for the shared FastAPI backend in <code>servers/fastapi</code>).
(用于 <code>servers/fastapi</code> 中的共享 FastAPI 后端)。
</p>
- Setup (First Time)
- 初始化设置(首次)
<pre><code class="language-bash">cd electron
npm run setup:env</code></pre>
This installs Node dependencies, runs <code>uv sync</code> in the FastAPI
server, and installs Next.js dependencies.
这将安装 Node 依赖,在 FastAPI
服务器中运行 <code>uv sync</code>,并安装 Next.js 依赖。
- Run in Development
- 开发模式运行
<pre><code class="language-bash">npm run dev</code></pre>
<p>
This compiles TypeScript and starts Electron. The backend and UI run locally
inside the desktop window.
这将编译 TypeScript 并启动 Electron。后端与 UI 在桌面窗口内本地运行。
</p>
- Build Distributable (Optional)
To create installers for Windows, macOS, or Linux:
- 构建可分发版本(可选)
WindowsmacOS Linux 创建安装包:
<pre><code class="language-bash">npm run build:all
npm run dist</code></pre>
<p>
Output files are written to <code>electron/dist</code>
(or as configured in your <code>electron-builder</code> settings).
输出文件写入 <code>electron/dist</code>
(或按你的 <code>electron-builder</code> 配置)。
</p>
<p>
For a public macOS DMG outside the Mac App Store, use
<code>APPLE_KEYCHAIN_PROFILE="presenton-notary" npm run build:all:mac:signed</code>
from <code>electron/</code> after the one-time Developer ID and notarization
setup in <code>docs/macos/dev/direct-distribution.md</code>.
若要在 Mac App Store 之外分发公开 macOS DMG,请在 <code>electron/</code> 目录下,完成 <code>docs/macos/dev/direct-distribution.md</code> 中的一次性 Developer ID 与公证(notarization
设置后,运行
<code>APPLE_KEYCHAIN_PROFILE="presenton-notary" npm run build:all:mac:signed</code>。
</p>
**Option 2: Docker**
**选项 2Docker**
- Start Presenton
Linux/MacOS (Bash/Zsh Shell):
- 启动 Presenton
Linux/MacOSBash/Zsh Shell):
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
Windows (PowerShell):
WindowsPowerShell):
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -v "${PWD}\app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Open Presenton
- 打开 Presenton
<p>
Open <a href="http://localhost:5001">http://localhost:5001</a> in the browser
of your choice to use Presenton.
在任意浏览器中打开 <a href="http://localhost:5001">http://localhost:5001</a> 即可使用 Presenton。
</p>
<blockquote>
<p>
<strong>Note:</strong> You can replace <code>5001</code> with any other port
number of your choice to run Presenton on a different port number. If you use
Docker Compose, set <code>PRESENTON_HTTP_HOST_PORT</code>, for example
<code>PRESENTON_HTTP_HOST_PORT=8080 docker compose up production</code>.
<strong>注意:</strong> 可将 <code>5001</code> 替换为任意其他端口号,以在不同端口上运行 Presenton。若使用
Docker Compose,请设置 <code>PRESENTON_HTTP_HOST_PORT</code>,例如
<code>PRESENTON_HTTP_HOST_PORT=8080 docker compose up production</code>。
</p>
</blockquote>
#
### ⚙️ Deployment Configurations
### ⚙️ 部署配置
The lists below match the environment variables forwarded in this repositorys **`docker-compose.yml`** (`production`, `production-gpu`, `development`, and `development-gpu`). Put values in a `.env` file next to the compose file, or export them before `docker compose up`. The Electron app backend can read the same names when run outside Docker.
下列列表与本仓库 **`docker-compose.yml`**`production``production-gpu``development` `development-gpu`)中转发的环境变量一致。请将取值写入与 compose 文件同目录的 `.env` 文件,或在执行 `docker compose up` 之前导出它们。在 Docker 外运行时,Electron 应用后端也可读取相同名称的变量。
Other optional variables exist in code (for example advanced Mem0 paths, LiteParse runners, or `FAST_API_INTERNAL_URL` when Next.js and FastAPI are not same-origin); they are **not** wired in `docker-compose.yml`. Supported names are discoverable from `servers/fastapi/utils/get_env.py` and the Next.js server utilities under `servers/nextjs/`.
代码中还存在其他可选变量(例如高级 Mem0 路径、LiteParse 运行器,或当 Next.js 与 FastAPI 非同源时的 `FAST_API_INTERNAL_URL`);它们**未**接入 `docker-compose.yml`。受支持的名称可从 `servers/fastapi/utils/get_env.py` 以及 `servers/nextjs/` 下的 Next.js 服务端工具中发现。
#### LLM and API keys
#### LLM API 密钥
- **CAN_CHANGE_KEYS**=[true/false]: Set to **false** if you want to keep API keys hidden and make them unmodifiable.
- **LLM**=[openai/deepseek/google/vertex/azure/bedrock/openrouter/fireworks/together/cerebras/anthropic/litellm/lmstudio/ollama/custom/codex]: Select the text **LLM**.
- **OPENAI_API_KEY**: Required if **LLM** is **openai**.
- **OPENAI_MODEL**: Required if **LLM** is **openai** (default: `gpt-4.1`).
- **DEEPSEEK_API_KEY**: Required if **LLM** is **deepseek**.
- **DEEPSEEK_MODEL**: Required if **LLM** is **deepseek** (default: `deepseek-chat`).
- **DEEPSEEK_BASE_URL**: Optional if **LLM** is **deepseek** (default: `https://api.deepseek.com`).
- **GOOGLE_API_KEY**: Required if **LLM** is **google**.
- **GOOGLE_MODEL**: Required if **LLM** is **google** (default: `models/gemini-2.0-flash`).
- **VERTEX_MODEL**: Required if **LLM** is **vertex** (default: `gemini-2.5-flash`).
- **VERTEX_API_KEY**: Optional auth path for **LLM=vertex** (Vertex Express).
- **VERTEX_PROJECT** / **VERTEX_LOCATION**: Optional auth path for **LLM=vertex** when using GCP project credentials (do not combine with `VERTEX_API_KEY`).
- **VERTEX_BASE_URL**: Optional Vertex gateway/base URL override.
- **AZURE_OPENAI_MODEL**: Required if **LLM** is **azure** (deployment/model name).
- **AZURE_OPENAI_API_KEY**: Required if **LLM** is **azure**.
- **AZURE_OPENAI_API_VERSION**: Required if **LLM** is **azure** (for example `2024-10-21`).
- **AZURE_OPENAI_ENDPOINT** / **AZURE_OPENAI_BASE_URL**: At least one is required if **LLM** is **azure**.
- **AZURE_OPENAI_DEPLOYMENT**: Optional deployment override for **LLM** is **azure**.
- **BEDROCK_REGION**: Optional if **LLM** is **bedrock** (default: `us-east-1`).
- **BEDROCK_MODEL**: Required if **LLM** is **bedrock**. Use a standard model ID (example: `us.anthropic.claude-3-5-haiku-20241022-v1:0`) or a full **inference profile ARN** for newer models (example: Claude Sonnet 4.6). Passed through to Bedrock Converse as `modelId`. See **[Amazon Bedrock guide](docs/amazon-bedrock.md)**.
- **BEDROCK_API_KEY**: Optional if **LLM** is **bedrock** (API key auth; alternative to AWS keys).
- **BEDROCK_AWS_ACCESS_KEY_ID** / **BEDROCK_AWS_SECRET_ACCESS_KEY**: Required together if **LLM** is **bedrock** and `BEDROCK_API_KEY` is not set.
- **BEDROCK_AWS_SESSION_TOKEN**: Optional session token for **LLM** is **bedrock**.
- **BEDROCK_PROFILE_NAME**: Optional AWS profile name for **LLM** is **bedrock**.
- **OPENROUTER_API_KEY**: Required if **LLM** is **openrouter**.
- **OPENROUTER_MODEL**: Required if **LLM** is **openrouter** (default: `openai/gpt-4o`).
- **OPENROUTER_BASE_URL**: Optional if **LLM** is **openrouter** (default: `https://openrouter.ai/api/v1`).
- **FIREWORKS_API_KEY**: Required if **LLM** is **fireworks**.
- **FIREWORKS_MODEL**: Required if **LLM** is **fireworks** (example: `accounts/fireworks/models/llama-v3p1-8b-instruct`).
- **FIREWORKS_BASE_URL**: Optional if **LLM** is **fireworks** (default: `https://api.fireworks.ai/inference/v1`).
- **TOGETHER_API_KEY**: Required if **LLM** is **together**.
- **TOGETHER_MODEL**: Required if **LLM** is **together** (example: `openai/gpt-oss-20b`).
- **TOGETHER_BASE_URL**: Optional if **LLM** is **together** (default: `https://api.together.ai/v1`).
- **CEREBRAS_API_KEY**: Required if **LLM** is **cerebras**.
- **CEREBRAS_MODEL**: Required if **LLM** is **cerebras** (default: `llama-3.3-70b`).
- **CEREBRAS_BASE_URL**: Optional if **LLM** is **cerebras** (default: `https://api.cerebras.ai/v1`).
- **ANTHROPIC_API_KEY**: Required if **LLM** is **anthropic**.
- **ANTHROPIC_MODEL**: Required if **LLM** is **anthropic** (default: `claude-3-5-sonnet-20241022`).
- **CODEX_MODEL**: Required if **LLM** is **codex** (Codex OAuth flow; compose maps host port **1455** for the callback).
- **CUSTOM_LLM_URL**: OpenAI-compatible base URL if **LLM** is **custom**.
- **CUSTOM_LLM_API_KEY**: API key if **LLM** is **custom**.
- **CUSTOM_MODEL**: Model id if **LLM** is **custom**.
- **LITELLM_BASE_URL**: LiteLLM proxy or gateway base URL if **LLM** is **litellm**.
- **LITELLM_API_KEY**: Optional API key if **LLM** is **litellm**.
- **LITELLM_MODEL**: Required if **LLM** is **litellm** (default: `gpt-4.1`).
- **LMSTUDIO_BASE_URL**: Optional LM Studio base URL if **LLM** is **lmstudio** (default: `http://localhost:1234/v1`; `/v1` is auto-appended when omitted).
- **LMSTUDIO_API_KEY**: Optional API key if **LLM** is **lmstudio**.
- **LMSTUDIO_MODEL**: Required if **LLM** is **lmstudio** (example: `openai/gpt-oss-20b`).
- **DISABLE_THINKING**=[true/false]: If **true**, disables “thinking” for providers that support it (including DeepSeek).
- **WEB_GROUNDING**=[true/false]: If **true**, enables web search by default.
- **WEB_SEARCH_PROVIDER**=[auto/native/searxng/tavily/exa]: Selects the web search mode. `auto` uses native search for OpenAI, Google, and Anthropic, and otherwise leaves web search off unless you choose an external provider.
- **CAN_CHANGE_KEYS**=[true/false]:若希望隐藏 API 密钥并禁止修改,请设为 **false**
- **LLM**=[openai/deepseek/google/vertex/azure/bedrock/openrouter/fireworks/together/cerebras/anthropic/litellm/lmstudio/ollama/custom/codex]:选择文本 **LLM**
- **OPENAI_API_KEY**:当 **LLM** **openai** 时必填。
- **OPENAI_MODEL**:当 **LLM** **openai** 时必填(默认:`gpt-4.1`)。
- **DEEPSEEK_API_KEY**:当 **LLM** **deepseek** 时必填。
- **DEEPSEEK_MODEL**:当 **LLM** **deepseek** 时必填(默认:`deepseek-chat`)。
- **DEEPSEEK_BASE_URL**:当 **LLM** **deepseek** 时可选(默认:`https://api.deepseek.com`)。
- **GOOGLE_API_KEY**:当 **LLM** **google** 时必填。
- **GOOGLE_MODEL**:当 **LLM** **google** 时必填(默认:`models/gemini-2.0-flash`)。
- **VERTEX_MODEL**:当 **LLM** **vertex** 时必填(默认:`gemini-2.5-flash`)。
- **VERTEX_API_KEY**:当 **LLM=vertex** 时的可选认证方式(Vertex Express)。
- **VERTEX_PROJECT** / **VERTEX_LOCATION**:使用 GCP 项目凭据且 **LLM=vertex** 时的可选认证方式(勿与 `VERTEX_API_KEY` 同时使用)。
- **VERTEX_BASE_URL**:可选的 Vertex 网关/基础 URL 覆盖。
- **AZURE_OPENAI_MODEL**:当 **LLM** **azure** 时必填(部署/模型名称)。
- **AZURE_OPENAI_API_KEY**:当 **LLM** **azure** 时必填。
- **AZURE_OPENAI_API_VERSION**:当 **LLM** **azure** 时必填(例如 `2024-10-21`)。
- **AZURE_OPENAI_ENDPOINT** / **AZURE_OPENAI_BASE_URL**:当 **LLM** **azure** 时至少需设置其一。
- **AZURE_OPENAI_DEPLOYMENT**:当 **LLM** **azure** 时的可选部署覆盖。
- **BEDROCK_REGION**:当 **LLM** **bedrock** 时可选(默认:`us-east-1`)。
- **BEDROCK_MODEL**:当 **LLM** **bedrock** 时必填。使用标准模型 ID(示例:`us.anthropic.claude-3-5-haiku-20241022-v1:0`)或较新模型的完整 **inference profile ARN**(示例:Claude Sonnet 4.6)。会作为 `modelId` 传递给 Bedrock Converse。请参阅 **[Amazon Bedrock 指南](docs/amazon-bedrock.md)**
- **BEDROCK_API_KEY**:当 **LLM** **bedrock** 时可选(API 密钥认证;AWS 密钥的替代方案)。
- **BEDROCK_AWS_ACCESS_KEY_ID** / **BEDROCK_AWS_SECRET_ACCESS_KEY**:当 **LLM** **bedrock** 且未设置 `BEDROCK_API_KEY` 时,需同时设置。
- **BEDROCK_AWS_SESSION_TOKEN**:当 **LLM** **bedrock** 时的可选会话令牌。
- **BEDROCK_PROFILE_NAME**:当 **LLM** **bedrock** 时的可选 AWS 配置文件名称。
- **OPENROUTER_API_KEY**:当 **LLM** **openrouter** 时必填。
- **OPENROUTER_MODEL**:当 **LLM** **openrouter** 时必填(默认:`openai/gpt-4o`)。
- **OPENROUTER_BASE_URL**:当 **LLM** **openrouter** 时可选(默认:`https://openrouter.ai/api/v1`)。
- **FIREWORKS_API_KEY**:当 **LLM** **fireworks** 时必填。
- **FIREWORKS_MODEL**:当 **LLM** **fireworks** 时必填(示例:`accounts/fireworks/models/llama-v3p1-8b-instruct`)。
- **FIREWORKS_BASE_URL**:当 **LLM** **fireworks** 时可选(默认:`https://api.fireworks.ai/inference/v1`)。
- **TOGETHER_API_KEY**:当 **LLM** **together** 时必填。
- **TOGETHER_MODEL**:当 **LLM** **together** 时必填(示例:`openai/gpt-oss-20b`)。
- **TOGETHER_BASE_URL**:当 **LLM** **together** 时可选(默认:`https://api.together.ai/v1`)。
- **CEREBRAS_API_KEY**:当 **LLM** **cerebras** 时必填。
- **CEREBRAS_MODEL**:当 **LLM** **cerebras** 时必填(默认:`llama-3.3-70b`)。
- **CEREBRAS_BASE_URL**:当 **LLM** **cerebras** 时可选(默认:`https://api.cerebras.ai/v1`)。
- **ANTHROPIC_API_KEY**:当 **LLM** **anthropic** 时必填。
- **ANTHROPIC_MODEL**:当 **LLM** **anthropic** 时必填(默认:`claude-3-5-sonnet-20241022`)。
- **CODEX_MODEL**:当 **LLM** **codex** 时必填(Codex OAuth 流程;compose 将主机端口 **1455** 映射用于回调)。
- **CUSTOM_LLM_URL**:当 **LLM** **custom** 时的 OpenAI 兼容基础 URL。
- **CUSTOM_LLM_API_KEY**:当 **LLM** **custom** 时的 API 密钥。
- **CUSTOM_MODEL**:当 **LLM** **custom** 时的模型 ID。
- **LITELLM_BASE_URL**:当 **LLM** **litellm** 时的 LiteLLM 代理或网关基础 URL。
- **LITELLM_API_KEY**:当 **LLM** **litellm** 时的可选 API 密钥。
- **LITELLM_MODEL**:当 **LLM** **litellm** 时必填(默认:`gpt-4.1`)。
- **LMSTUDIO_BASE_URL**:当 **LLM** **lmstudio** 时的可选 LM Studio 基础 URL(默认:`http://localhost:1234/v1`;省略时会自动追加 `/v1`)。
- **LMSTUDIO_API_KEY**:当 **LLM** **lmstudio** 时的可选 API 密钥。
- **LMSTUDIO_MODEL**:当 **LLM** **lmstudio** 时必填(示例:`openai/gpt-oss-20b`)。
- **DISABLE_THINKING**=[true/false]:若为 **true**,则对支持该功能的提供商(包括 DeepSeek)禁用“思考”(thinking)。
- **WEB_GROUNDING**=[true/false]:若为 **true**,则默认启用网页搜索。
- **WEB_SEARCH_PROVIDER**=[auto/native/searxng/tavily/exa]:选择网页搜索模式。`auto` OpenAIGoogle Anthropic 使用原生搜索,否则除非你选择外部提供商,否则网页搜索保持关闭。
<!-- Brave and Serper search providers are hidden until they are tested. -->
<!-- - **WEB_SEARCH_PROVIDER** also supports `brave` and `serper`. -->
- **WEB_SEARCH_MAX_RESULTS**: Maximum external search results to add to model context (default `5`, maximum `10`).
- **SEARXNG_BASE_URL**: Base URL for a self-hosted SearXNG instance.
- **TAVILY_API_KEY**, **EXA_API_KEY**: Credentials for optional hosted search APIs.
- **WEB_SEARCH_MAX_RESULTS**:添加到模型上下文的外部搜索结果数量上限(默认 `5`,最大 `10`)。
- **SEARXNG_BASE_URL**:自托管 SearXNG 实例的基础 URL。
- **TAVILY_API_KEY****EXA_API_KEY**:可选托管搜索 API 的凭据。
<!-- - **BRAVE_SEARCH_API_KEY**, **SERPER_API_KEY**: Credentials for hidden, untested hosted search APIs. -->
- **EXTENDED_REASONING**=[true/false]: Enables extended reasoning where supported by the configured stack.
- **EXTENDED_REASONING**=[true/false]:在已配置技术栈支持的情况下启用扩展推理(extended reasoning)。
#### Ollama
Use when **LLM** is **ollama**:
**LLM** **ollama** 时使用:
- **OLLAMA_URL**: Base URL of the Ollama HTTP API (e.g. `http://host.docker.internal:11434` from Docker).
- **OLLAMA_MODEL**: Model name in Ollama (e.g. `llama3.2:3b`).
- **START_OLLAMA**=[true/false]: Container entrypoint (`start.js`): optional install + `ollama serve`. Default **false** (`development` / `production` compose).
- **OLLAMA_URL**Ollama HTTP API 的基础 URL(例如 Docker 中的 `http://host.docker.internal:11434`)。
- **OLLAMA_MODEL**Ollama 中的模型名称(例如 `llama3.2:3b`)。
- **START_OLLAMA**=[true/false]:容器入口点(`start.js`):可选安装 + `ollama serve`。默认 **false**`development` / `production` compose)。
#### Presentation memory (Mem0 OSS)
#### 演示文稿记忆(Mem0 OSS
Mem0 uses local Qdrant + SQLite (OSS); memory is scoped per presentation.
Mem0 使用本地 Qdrant + SQLiteOSS);记忆按演示文稿(presentation)作用域划分。
By default the Docker runtime now points Mem0 at a local Ollama-compatible LLM endpoint, so it no longer needs an OpenAI key just to initialize. If you want to use OpenAI instead, set `MEM0_LLM_BASE_URL`/`MEM0_LLM_API_KEY` to your OpenAI-compatible endpoint and key.
Docker images install the default spaCy model (`en_core_web_sm`) during build so Mem0 can start without extra setup on each run.
默认情况下,Docker 运行时会将 Mem0 指向本地 Ollama 兼容的 LLM 端点,因此初始化时不再需要 OpenAI 密钥。若希望改用 OpenAI,请将 `MEM0_LLM_BASE_URL`/`MEM0_LLM_API_KEY` 设置为你的 OpenAI 兼容端点与密钥。
Docker 镜像在构建期间会安装默认 spaCy 模型(`en_core_web_sm`),以便 Mem0 在每次运行时无需额外配置即可启动。
| Variable | Purpose |
| 变量 | 用途 |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **MEM0_ENABLED** | **true**/false (compose default **true**). |
| **MEM0_LLM_MODEL** | Mem0 LLM model name (compose default **`llama3.1:latest`** or `OLLAMA_MODEL`). |
| **MEM0_LLM_API_KEY** | Mem0 LLM API key placeholder for OpenAI-compatible clients (compose default **`ollama`**). |
| **MEM0_LLM_BASE_URL** | Mem0 LLM base URL (compose default **`OLLAMA_URL`** or `http://host.docker.internal:11434`). |
| **MEM0_DIR** | Root directory (compose default **`/app_data/mem0`**). |
| **MEM0_EMBEDDER_PROVIDER** | Embedder backend (compose default **`fastembed`**). |
| **MEM0_EMBEDDER_MODEL** | Model id (compose default **`BAAI/bge-small-en-v1.5`**). |
| **MEM0_EMBEDDING_DIMS** | Vector size (compose default **384**). |
| **MEM0_SPACY_MODEL** | Optional spaCy model override (default **`en_core_web_sm`**). |
| **MEM0_REQUIRE_SPACY_MODEL** | Keep as **true** (default). Set to false only if you intentionally want Mem0 to run without spaCy lemmatization. |
| **MEM0_ENABLED** | **true**/falsecompose 默认值 **true**)。 |
| **MEM0_LLM_MODEL** | Mem0 LLM 模型名称(compose 默认值 **`llama3.1:latest`** `OLLAMA_MODEL`)。 |
| **MEM0_LLM_API_KEY** | 面向 OpenAI 兼容客户端的 Mem0 LLM API 密钥占位符(compose 默认值 **`ollama`**)。 |
| **MEM0_LLM_BASE_URL** | Mem0 LLM 基础 URLcompose 默认值 **`OLLAMA_URL`** `http://host.docker.internal:11434`)。 |
| **MEM0_DIR** | 根目录(compose 默认值 **`/app_data/mem0`**)。 |
| **MEM0_EMBEDDER_PROVIDER** | 嵌入器(Embedder)后端(compose 默认值 **`fastembed`**)。 |
| **MEM0_EMBEDDER_MODEL** | 模型 IDcompose 默认值 **`BAAI/bge-small-en-v1.5`**)。 |
| **MEM0_EMBEDDING_DIMS** | 向量维度(compose 默认值 **384**)。 |
| **MEM0_SPACY_MODEL** | 可选的 spaCy 模型覆盖(默认值 **`en_core_web_sm`**)。 |
| **MEM0_REQUIRE_SPACY_MODEL** | 保持为 **true**(默认值)。仅当你有意让 Mem0 在不使用 spaCy 词形还原的情况下运行时,才设置为 false。 |
#### Document parsing (LiteParse)
#### 文档解析(LiteParse
| Variable | Purpose |
| 变量 | 用途 |
| ------------------------- | ----------------------------------------- |
| **LITEPARSE_DPI** | OCR render DPI (compose default **120**). |
| **LITEPARSE_NUM_WORKERS** | Worker count (compose default **1**). |
| **LITEPARSE_DPI** | OCR 渲染 DPIcompose 默认值 **120**)。 |
| **LITEPARSE_NUM_WORKERS** | 工作进程数量(compose 默认值 **1**)。 |
#### Database
#### 数据库
- **DATABASE_URL**: SQLAlchemy URL; if unset, the app falls back to SQLite under app data.
- **MIGRATE_DATABASE_ON_STARTUP**: Compose sets **`true`** for all services so migrations run on startup.
- **DATABASE_URL**SQLAlchemy URL;若未设置,应用会回退到应用数据目录下的 SQLite。
- **MIGRATE_DATABASE_ON_STARTUP**Compose 为所有服务设置 **`true`**,以便在启动时运行迁移。
#### Image generation
#### 图像生成
These variables match `docker-compose.yml`. **`IMAGE_PROVIDER`** selects the backend (`pexels`, `pixabay`, `gemini_flash`, `nanobanana_pro`, `dall-e-3`, `gpt-image-1.5`, `comfyui`, `open_webui`). Use **OPENAI_API_KEY** for OpenAI image modes and **GOOGLE_API_KEY** for Gemini image modes (same keys as the LLM section).
这些变量与 `docker-compose.yml` 对应。**`IMAGE_PROVIDER`** 用于选择后端(`pexels``pixabay``gemini_flash``nanobanana_pro``dall-e-3``gpt-image-1.5``comfyui``open_webui`)。OpenAI 图像模式使用 **OPENAI_API_KEY**Gemini 图像模式使用 **GOOGLE_API_KEY**(与 LLM 部分使用相同的密钥)。
- **DISABLE_IMAGE_GENERATION**=[true/false]: Disable slide image generation.
- **IMAGE_PROVIDER**: Provider id (see enum above).
- **PEXELS_API_KEY**: Pexels stock images.
- **PIXABAY_API_KEY**: Pixabay stock images.
- **DALL_E_3_QUALITY**=[standard/hd]: Optional for **dall-e-3** (default `standard`).
- **GPT_IMAGE_1_5_QUALITY**=[low/medium/high]: Optional for **gpt-image-1.5** (default `medium`).
- **COMFYUI_URL** / **COMFYUI_WORKFLOW**: Self-hosted ComfyUI workflow JSON.
- **OPEN_WEBUI_IMAGE_URL** / **OPEN_WEBUI_IMAGE_API_KEY**: Open WebUIcompatible image endpoint.
- **OPENAI_COMPAT_IMAGE_BASE_URL** / **OPENAI_COMPAT_IMAGE_API_KEY** / **OPENAI_COMPAT_IMAGE_MODEL**: Required if using **openai_compatible** to send image requests to any OpenAI-compatible `/v1/images/*` endpoint (LiteLLM, Azure, vLLM Gateways, etc.).
- **DISABLE_IMAGE_GENERATION**=[true/false]:禁用幻灯片图像生成。
- **IMAGE_PROVIDER**:提供商 ID(见上文枚举)。
- **PEXELS_API_KEY**Pexels 图库图片。
- **PIXABAY_API_KEY**Pixabay 图库图片。
- **DALL_E_3_QUALITY**=[standard/hd]**dall-e-3** 的可选配置(默认值 `standard`)。
- **GPT_IMAGE_1_5_QUALITY**=[low/medium/high]**gpt-image-1.5** 的可选配置(默认值 `medium`)。
- **COMFYUI_URL** / **COMFYUI_WORKFLOW**:自托管 ComfyUI 工作流 JSON
- **OPEN_WEBUI_IMAGE_URL** / **OPEN_WEBUI_IMAGE_API_KEY**:兼容 Open WebUI 的图像端点。
- **OPENAI_COMPAT_IMAGE_BASE_URL** / **OPENAI_COMPAT_IMAGE_API_KEY** / **OPENAI_COMPAT_IMAGE_MODEL**:若使用 **openai_compatible** 将图像请求发送到任意 OpenAI 兼容的 `/v1/images/*` 端点(LiteLLMAzurevLLM Gateways 等),则为必填项。
#### Telemetry
#### 遥测
- **DISABLE_ANONYMOUS_TRACKING**=[true/false]: Set to **true** to disable anonymous telemetry.
- **DISABLE_ANONYMOUS_TRACKING**=[true/false]:设置为 **true** 以禁用匿名遥测。
#### Authentication (web login)
#### 身份验证(Web 登录)
Presenton uses a **single admin account** per instance. Credentials live in `app_data` (hashed; see `userConfig.json`). Pass these with `-e` or via `.env` for compose:
Presenton 每个实例使用**单一管理员账户**。凭据存储在 `app_data`(已哈希;参见 `userConfig.json`)。可通过 `-e` 传入,或在 compose 中通过 `.env` 传入:
- **AUTH_USERNAME** / **AUTH_PASSWORD**Preseed the admin login on first boot (password at least 6 characters). Ignored if a user already exists unless **AUTH_OVERRIDE_FROM_ENV** is set.
- **AUTH_OVERRIDE_FROM_ENV**=[true/false] — If **true**, replace stored credentials from the env vars on every FastAPI startup and rotate the session signing secret (invalidates existing sessions). Remove after a one-off rotation.
- **RESET_AUTH**=[true/false] — If **true**, clear stored credentials on startup. Use for a **single** boot to recover access, then unset.
- **AUTH_USERNAME** / **AUTH_PASSWORD**在首次启动时预置管理员登录(密码至少 6 个字符)。若用户已存在则忽略,除非设置了 **AUTH_OVERRIDE_FROM_ENV**
- **AUTH_OVERRIDE_FROM_ENV**=[true/false] — 若为 **true**,则在每次 FastAPI 启动时从环境变量替换已存储的凭据,并轮换会话签名密钥(会使现有会话失效)。一次性轮换完成后请移除该设置。
- **RESET_AUTH**=[true/false] — 若为 **true**,则在启动时清除已存储的凭据。用于**单次**启动以恢复访问权限,之后请取消设置。
**Examples**
**示例**
```bash
docker run -it --name presenton -p 5001:80 -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest
@@ -396,15 +397,15 @@ docker stop presenton && docker rm presenton && docker run -it --name presenton
docker stop presenton && docker rm presenton && docker run -it --name presenton -p 5001:80 -e AUTH_USERNAME=admin -e AUTH_PASSWORD=changeme123 -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest
```
**Manual reset:** stop the container, edit `./app_data/userConfig.json`, delete `AUTH_USERNAME`, `AUTH_PASSWORD_HASH`, and `AUTH_SECRET_KEY`, save, and start again.
**手动重置:**停止容器,编辑 `./app_data/userConfig.json`,删除 `AUTH_USERNAME``AUTH_PASSWORD_HASH` `AUTH_SECRET_KEY`,保存后重新启动。
Sign out from the app: **Settings → Other → Sign out**.
在应用中退出登录:**Settings → Other → Sign out**。
#### MCP authentication
#### MCP 身份验证
When auth is configured (`AUTH_USERNAME` / `AUTH_PASSWORD`), the MCP endpoint at `/mcp` now requires authentication as well.
当已配置身份验证(`AUTH_USERNAME` / `AUTH_PASSWORD`)时,位于 `/mcp` 的 MCP 端点现在也需要身份验证。
1. Log in once to get a bearer token:
1. 登录一次以获取 bearer token
```bash
curl -s -X POST http://localhost:5001/api/v1/auth/login \
@@ -412,12 +413,12 @@ curl -s -X POST http://localhost:5001/api/v1/auth/login \
-d '{"username":"admin","password":"changeme123"}'
```
The response includes:
响应包含:
- `access_token` (session token)
- `token_type` (`bearer`)
- `access_token`(会话 token
- `token_type``bearer`
2. Configure your MCP client to send that token on every request:
2. 配置你的 MCP 客户端,在每次请求中发送该 token:
```json
{
@@ -432,92 +433,92 @@ The response includes:
}
```
Notes:
说明:
- If you rotate credentials with `AUTH_OVERRIDE_FROM_ENV=true`, previously issued session tokens are invalidated.
- MCP is not available in the Electron desktop app (`PRESENTON_ELECTRON=true`). Electron runs with `DISABLE_AUTH=true` by default, and the MCP server is disabled there to avoid auth conflicts.
- 若你通过 `AUTH_OVERRIDE_FROM_ENV=true` 轮换凭据,此前签发的会话 token 将失效。
- MCP 在 Electron 桌面应用中不可用(`PRESENTON_ELECTRON=true`)。Electron 默认以 `DISABLE_AUTH=true` 运行,且为避免身份验证冲突,MCP 服务器在该环境中被禁用。
> Note: LLM and image variables above are forwarded from **`docker-compose.yml`** when set in `.env`.
> 注意:当在 `.env` 中设置时,上述 LLM 和图像变量会从 **`docker-compose.yml`** 转发。
<br>
<br>
**Docker Run Examples by Provider**
**按提供商分类的 Docker Run 示例**
Same variables as compose; use `-e` instead of `.env` when running `docker run` directly.
变量与 compose 相同;直接运行 `docker run` 时,使用 `-e` 而非 `.env`
- Using OpenAI
- 使用 OpenAI
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="openai" -e OPENAI_API_KEY="******" -e IMAGE_PROVIDER="dall-e-3" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Google
- 使用 Google
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="google" -e GOOGLE_API_KEY="******" -e IMAGE_PROVIDER="gemini_flash" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Vertex AI (API key mode)
- 使用 Vertex AIAPI key 模式)
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="vertex" -e VERTEX_API_KEY="******" -e VERTEX_MODEL="gemini-2.5-flash" -e IMAGE_PROVIDER="gemini_flash" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Azure OpenAI
- 使用 Azure OpenAI
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="azure" -e AZURE_OPENAI_API_KEY="******" -e AZURE_OPENAI_MODEL="gpt-4.1" -e AZURE_OPENAI_API_VERSION="2024-10-21" -e AZURE_OPENAI_ENDPOINT="https://YOUR-RESOURCE.openai.azure.com" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Amazon Bedrock (on-demand model ID) — see **[docs/amazon-bedrock.md](docs/amazon-bedrock.md)** for inference profiles, IAM, and troubleshooting.
- 使用 Amazon Bedrock(按需模型 ID)— 有关推理配置文件(inference profiles)、IAM 与故障排查,请参阅 **[docs/amazon-bedrock.md](docs/amazon-bedrock.md)**
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="bedrock" -e BEDROCK_REGION="us-east-1" -e BEDROCK_AWS_ACCESS_KEY_ID="******" -e BEDROCK_AWS_SECRET_ACCESS_KEY="******" -e BEDROCK_MODEL="us.anthropic.claude-3-5-haiku-20241022-v1:0" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Amazon Bedrock (inference profile ARN, e.g. Claude Sonnet 4.6)
- 使用 Amazon Bedrock(推理配置文件 ARN,例如 Claude Sonnet 4.6
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="bedrock" -e BEDROCK_REGION="us-east-1" -e BEDROCK_AWS_ACCESS_KEY_ID="******" -e BEDROCK_AWS_SECRET_ACCESS_KEY="******" -e BEDROCK_MODEL="arn:aws:bedrock:us-east-1:YOUR_ACCOUNT_ID:inference-profile/us.anthropic.claude-sonnet-4-6" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Fireworks
- 使用 Fireworks
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="fireworks" -e FIREWORKS_API_KEY="******" -e FIREWORKS_MODEL="accounts/fireworks/models/llama-v3p1-8b-instruct" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Together AI
- 使用 Together AI
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="together" -e TOGETHER_API_KEY="******" -e TOGETHER_MODEL="openai/gpt-oss-20b" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Ollama
- 使用 Ollama
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="ollama" -e OLLAMA_MODEL="llama3.2:3b" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="*******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using Anthropic
- 使用 Anthropic
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="anthropic" -e ANTHROPIC_API_KEY="******" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using LM Studio (local)
- 使用 LM Studio(本地)
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e LLM="lmstudio" -e LMSTUDIO_BASE_URL="http://host.docker.internal:1234" -e LMSTUDIO_MODEL="openai/gpt-oss-20b" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using OpenAI Compatible LLM API
- 使用 OpenAI 兼容 LLM API
<pre><code class="language-bash">docker run -it -p 5001:80 -e CAN_CHANGE_KEYS="false" -e LLM="custom" -e CUSTOM_LLM_URL="http://*****" -e CUSTOM_LLM_API_KEY="*****" -e CUSTOM_MODEL="llama3.2:3b" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="********" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Running Presenton with GPU Support
To use GPU acceleration with Ollama models, you need to install and configure the NVIDIA Container Toolkit. This allows Docker containers to access your NVIDIA GPU.
Once the NVIDIA Container Toolkit is installed and configured, you can run Presenton with GPU support by adding the `--gpus=all` flag:
- 在 GPU 支持下运行 Presenton
若要对 Ollama 模型使用 GPU 加速,需要安装并配置 NVIDIA Container Toolkit,以便 Docker 容器访问 NVIDIA GPU
安装并配置好 NVIDIA Container Toolkit 后,可通过添加 `--gpus=all` 标志以 GPU 支持运行 Presenton
<pre><code class="language-bash">docker run -it --name presenton --gpus=all -p 5001:80 -e LLM="ollama" -e OLLAMA_MODEL="llama3.2:3b" -e IMAGE_PROVIDER="pexels" -e PEXELS_API_KEY="*******" -e CAN_CHANGE_KEYS="false" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
- Using an OpenAI-Compatible Image Provider
- 使用 OpenAI 兼容图像提供商
This routes all slide image requests through your OpenAI-compatible gateway (LiteLLM, Azure, vLLM, etc.) while keeping the text LLM configuration independent:
这会将所有幻灯片图像请求路由到你的 OpenAI 兼容网关(LiteLLMAzurevLLM 等),同时保持文本 LLM 配置独立:
<pre><code class="language-bash">docker run -it --name presenton -p 5001:80 -e IMAGE_PROVIDER="openai_compatible" -e OPENAI_COMPAT_IMAGE_BASE_URL="https://proxy.example.com/v1" -e OPENAI_COMPAT_IMAGE_API_KEY="******" -e OPENAI_COMPAT_IMAGE_MODEL="gpt-image-1" -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest</code></pre>
#
### ✨ Generate Presentation via API
### ✨ 通过 API 生成演示文稿
**Generate Presentation**
**生成演示文稿**
<p>
<strong>Endpoint:</strong> <code>/api/v1/ppt/presentation/generate</code><br>
<strong>Method:</strong> <code>POST</code><br>
<strong>Content-Type:</strong> <code>application/json</code>
<strong>端点:</strong> <code>/api/v1/ppt/presentation/generate</code><br>
<strong>方法:</strong> <code>POST</code><br>
<strong>Content-Type</strong> <code>application/json</code>
</p>
<p>
<strong>Authentication (HTTP Basic):</strong><br>
All <code>/api/v1/</code> routes except <code>/api/v1/auth/*</code> require authentication. Send your Presenton admin username and password (same as the web UI, or <strong>AUTH_USERNAME</strong> / <strong>AUTH_PASSWORD</strong> when preseeding Docker). With <code>curl</code>, put them right after <code>-u</code> as <code>-u USERNAME:PASSWORD</code> — that is HTTP Basic auth and sets <code>Authorization: Basic …</code> for you. Replace the sample <code>username:password</code> below with your real credentials.
<strong>身份验证(HTTP Basic):</strong><br>
<code>/api/v1/auth/*</code> 外,所有 <code>/api/v1/</code> 路由均需身份验证。请发送你的 Presenton 管理员用户名和密码(与 Web UI 相同,或在 Docker 预置时使用 <strong>AUTH_USERNAME</strong> / <strong>AUTH_PASSWORD</strong>)。使用 <code>curl</code> 时,在 <code>-u</code> 之后直接写 <code>-u USERNAME:PASSWORD</code> — HTTP Basic 身份验证,会自动设置 <code>Authorization: Basic …</code>。请将下方示例中的 <code>username:password</code> 替换为你的真实凭据。
</p>
**Request Body**
**请求体**
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
<th>参数</th>
<th>类型</th>
<th>必填</th>
<th>说明</th>
</tr>
</thead>
<tbody>
@@ -525,111 +526,111 @@ All <code>/api/v1/</code> routes except <code>/api/v1/auth/*</code> require auth
<tr>
<td><code>content</code></td>
<td>string</td>
<td>Yes</td>
<td>Main content used to generate the presentation.</td>
<td></td>
<td>用于生成演示文稿的主要内容。</td>
</tr>
<tr>
<td><code>slides_markdown</code></td>
<td>string[] | null</td>
<td>No</td>
<td>Provide custom slide markdown instead of auto-generation.</td>
<td></td>
<td>提供自定义幻灯片 Markdown,而非自动生成。</td>
</tr>
<tr>
<td><code>instructions</code></td>
<td>string | null</td>
<td>No</td>
<td>Additional generation instructions.</td>
<td></td>
<td>额外的生成说明。</td>
</tr>
<tr>
<td><code>tone</code></td>
<td>string</td>
<td>No</td>
<td></td>
<td>
Text tone (default: <code>"default"</code>).
Options: <code>default</code>, <code>casual</code>, <code>professional</code>,
<code>funny</code>, <code>educational</code>, <code>sales_pitch</code>
文本语气(默认:<code>"default"</code>)。
可选值:<code>default</code><code>casual</code><code>professional</code>
<code>funny</code><code>educational</code><code>sales_pitch</code>
</td>
</tr>
<tr>
<td><code>verbosity</code></td>
<td>string</td>
<td>No</td>
<td></td>
<td>
Content density (default: <code>"standard"</code>).
Options: <code>concise</code>, <code>standard</code>, <code>text-heavy</code>
内容密度(默认:<code>"standard"</code>)。
可选值:<code>concise</code><code>standard</code><code>text-heavy</code>
</td>
</tr>
<tr>
<td><code>web_search</code></td>
<td>boolean</td>
<td>No</td>
<td>Enable web search grounding (default: <code>false</code>).</td>
<td></td>
<td>启用网络搜索 grounding(默认:<code>false</code>)。</td>
</tr>
<tr>
<td><code>n_slides</code></td>
<td>integer</td>
<td>No</td>
<td>Number of slides to generate (default: <code>8</code>).</td>
<td></td>
<td>要生成的幻灯片数量(默认:<code>8</code>)。</td>
</tr>
<tr>
<td><code>language</code></td>
<td>string</td>
<td>No</td>
<td>Presentation language (default: <code>"English"</code>).</td>
<td></td>
<td>演示文稿语言(默认:<code>"English"</code>)。</td>
</tr>
<tr>
<td><code>template</code></td>
<td>string</td>
<td>No</td>
<td>Template name (default: <code>"general"</code>).</td>
<td></td>
<td>模板名称(默认:<code>"general"</code>)。</td>
</tr>
<tr>
<td><code>include_table_of_contents</code></td>
<td>boolean</td>
<td>No</td>
<td>Include table of contents slide (default: <code>false</code>).</td>
<td></td>
<td>包含目录页(默认:<code>false</code>)。</td>
</tr>
<tr>
<td><code>include_title_slide</code></td>
<td>boolean</td>
<td>No</td>
<td>Include title slide (default: <code>true</code>).</td>
<td></td>
<td>包含标题页(默认:<code>true</code>)。</td>
</tr>
<tr>
<td><code>files</code></td>
<td>string[] | null</td>
<td>No</td>
<td></td>
<td>
Files to use in generation.
Upload first via <code>/api/v1/ppt/files/upload</code>.
生成时使用的文件。
请先通过 <code>/api/v1/ppt/files/upload</code> 上传。
</td>
</tr>
<tr>
<td><code>export_as</code></td>
<td>string</td>
<td>No</td>
<td></td>
<td>
Export format (default: <code>"pptx"</code>).
Options: <code>pptx</code>, <code>pdf</code>
导出格式(默认:<code>"pptx"</code>)。
可选值:<code>pptx</code><code>pdf</code>
</td>
</tr>
</tbody>
</table>
**Response**
**响应**
<pre><code class="language-json">{
"presentation_id": "string",
@@ -637,7 +638,7 @@ Options: <code>pptx</code>, <code>pdf</code>
"edit_path": "string"
}</code></pre>
**Example (curl + HTTP Basic auth with <code>-u</code>)**
**示例(curl + 使用 <code>-u</code> 的 HTTP Basic 身份验证)**
<pre><code class="language-bash">curl -u username:password \
-X POST http://localhost:5001/api/v1/ppt/presentation/generate \
@@ -650,7 +651,7 @@ Options: <code>pptx</code>, <code>pdf</code>
"export_as": "pptx"
}'</code></pre>
**Example Response**
**示例响应**
<pre><code class="language-json">{
"presentation_id": "d3000f96-096c-4768-b67b-e99aed029b57",
@@ -659,43 +660,42 @@ Options: <code>pptx</code>, <code>pdf</code>
}</code></pre>
<blockquote>
<strong>Note:</strong>
Prepend your servers root URL to <code>path</code> and
<code>edit_path</code> to construct valid links.
<strong>注意:</strong>
在 <code>path</code> 和 <code>edit_path</code> 前加上服务器根 URL,即可构成有效链接。
</blockquote>
**Documentation & Tutorials**
**文档与教程**
<ul>
<li>
<a href="https://docs.presenton.ai/v3/get-started/quickstart">
Deploy Presenton
部署 Presenton
</a>
</li>
<li>
<a href="https://docs.presenton.ai/v3/get-started/api-introduction">
Full API Documentation
完整 API 文档
</a>
</li>
<li>
<a href="https://docs.presenton.ai/v3/guide/using-presenton-api">
Generate Presentations via API in 5 Minutes
5 分钟通过 API 生成演示文稿
</a>
</li>
<li>
<a href="https://docs.presenton.ai/tutorial/generate-presentation-from-csv">
Create Presentations from CSV using AI
使用 AI 从 CSV 创建演示文稿
</a>
</li>
<li>
<a href="https://docs.presenton.ai/tutorial/create-data-reports-using-ai">
Create Data Reports Using AI
使用 AI 创建数据报告
</a>
</li>
</ul>
#
### 🚀 Roadmap
### 🚀 路线图
Track the public roadmap on GitHub Projects: [https://github.com/orgs/presenton/projects/2](https://github.com/orgs/presenton/projects/2)
GitHub Projects 上跟踪公开路线图:[https://github.com/orgs/presenton/projects/2](https://github.com/orgs/presenton/projects/2)