From d691390d90e725184e63f1ae031ac0803c93a0a5 Mon Sep 17 00:00:00 2001
From: wehub-resource-sync
- Quickstart ·
- Docs ·
+ 快速入门 ·
+ 文档 ·
Youtube ·
Discord
@@ -48,63 +54,63 @@ What makes Presenton different?
#
-### 🎛 Features
+### 🎛 功能特性
-
+
-
+
| Platform | -Architecture | -Package | -Download | +平台 | +架构 | +安装包 | +下载 |
|---|---|---|---|---|---|---|---|
| macOS | Apple Silicon / Intel | .dmg |
-Download ↗ | +下载 ↗ | |||
| Windows | x64 | .exe |
-Download ↗ | +下载 ↗ | |||
| Linux | x64 | .deb |
-Download ↗ | +下载 ↗ |
@@ -159,218 +165,213 @@ Run Presenton directly in your browser — no installation, no setup required. S
#
-### ⚡ Running Presenton
+### ⚡ 运行 Presenton
- You can run Presenton in two ways:
- Docker for a one-command setup without installing a local dev
- stack, or the Electron desktop app for a native app
- experience (ideal for development or offline use).
+ 你可以通过两种方式运行 Presenton:
+ 使用 Docker 一条命令完成搭建,无需安装本地开发
+ 环境栈;或使用 Electron 桌面应用 获得原生应用
+ 体验(适合开发或离线使用)。
- 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 相同的环境变量。
- Prerequisites: Node.js (LTS), npm, Python 3.11, and
+ 前置要求:Node.js(LTS)、npm、Python 3.11,以及
uv
- (for the shared FastAPI backend in
- This compiles TypeScript and starts Electron. The backend and UI run locally
- inside the desktop window.
+ 这将编译 TypeScript 并启动 Electron。后端与 UI 在桌面窗口内本地运行。
- Output files are written to
- For a public macOS DMG outside the Mac App Store, use
-
- Open http://localhost:5001 in the browser
- of your choice to use Presenton.
+ 在任意浏览器中打开 http://localhost:5001 即可使用 Presenton。
- Note: You can replace
-Endpoint:
-Authentication (HTTP Basic):servers/fastapi).
+ (用于 servers/fastapi 中的共享 FastAPI 后端)。
- This installs Node dependencies, runs cd electron
npm run setup:envuv sync in the FastAPI
- server, and installs Next.js dependencies.
+ 这将安装 Node 依赖,在 FastAPI
+ 服务器中运行 uv sync,并安装 Next.js 依赖。
-- Run in Development
+- 开发模式运行
npm run devnpm run build:all
npm run distelectron/dist
- (or as configured in your electron-builder settings).
+ 输出文件写入 electron/dist
+ (或按你的 electron-builder 配置)。
APPLE_KEYCHAIN_PROFILE="presenton-notary" npm run build:all:mac:signed
- from electron/ after the one-time Developer ID and notarization
- setup in docs/macos/dev/direct-distribution.md.
+ 若要在 Mac App Store 之外分发公开 macOS DMG,请在 electron/ 目录下,完成 docs/macos/dev/direct-distribution.md 中的一次性 Developer ID 与公证(notarization)
+ 设置后,运行
+ APPLE_KEYCHAIN_PROFILE="presenton-notary" npm run build:all:mac:signed。
- Windows (PowerShell):
+ Windows(PowerShell):
docker run -it --name presenton -p 5001:80 -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest
-- Open Presenton
+- 打开 Presenton
docker run -it --name presenton -p 5001:80 -v "${PWD}\app_data:/app_data" ghcr.io/presenton/presenton:latest
#
-### ⚙️ Deployment Configurations
+### ⚙️ 部署配置
-The lists below match the environment variables forwarded in this repository’s **`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` 对 OpenAI、Google 和 Anthropic 使用原生搜索,否则除非你选择外部提供商,否则网页搜索保持关闭。
-- **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 的凭据。
-- **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 + SQLite(OSS);记忆按演示文稿(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**/false(compose 默认值 **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 基础 URL(compose 默认值 **`OLLAMA_URL`** 或 `http://host.docker.internal:11434`)。 |
+| **MEM0_DIR** | 根目录(compose 默认值 **`/app_data/mem0`**)。 |
+| **MEM0_EMBEDDER_PROVIDER** | 嵌入器(Embedder)后端(compose 默认值 **`fastembed`**)。 |
+| **MEM0_EMBEDDER_MODEL** | 模型 ID(compose 默认值 **`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 渲染 DPI(compose 默认值 **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 WebUI–compatible 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/*` 端点(LiteLLM、Azure、vLLM 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`** 转发。
5001 with any other port
- number of your choice to run Presenton on a different port number. If you use
- Docker Compose, set PRESENTON_HTTP_HOST_PORT, for example
- PRESENTON_HTTP_HOST_PORT=8080 docker compose up production.
+ 注意: 可将 5001 替换为任意其他端口号,以在不同端口上运行 Presenton。若使用
+ Docker Compose,请设置 PRESENTON_HTTP_HOST_PORT,例如
+ PRESENTON_HTTP_HOST_PORT=8080 docker compose up production。
-**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
-- Using Google
+- 使用 Google
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
-- Using Vertex AI (API key mode)
+- 使用 Vertex AI(API key 模式)
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
-- Using Azure OpenAI
+- 使用 Azure OpenAI
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
-- 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)**。
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
-- Using Amazon Bedrock (inference profile ARN, e.g. Claude Sonnet 4.6)
+- 使用 Amazon Bedrock(推理配置文件 ARN,例如 Claude Sonnet 4.6)
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
-- Using Fireworks
+- 使用 Fireworks
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
-- Using Together AI
+- 使用 Together AI
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
-- Using Ollama
+- 使用 Ollama
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
-- Using Anthropic
+- 使用 Anthropic
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
-- Using LM Studio (local)
+- 使用 LM Studio(本地)
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
-- Using OpenAI Compatible LLM API
+- 使用 OpenAI 兼容 LLM API
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
-- 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:
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
-- 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 兼容网关(LiteLLM、Azure、vLLM 等),同时保持文本 LLM 配置独立:
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
#
-### ✨ Generate Presentation via API
+### ✨ 通过 API 生成演示文稿
-**Generate Presentation**
+**生成演示文稿**
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/api/v1/ppt/presentation/generate
-Method: POST
-Content-Type: application/json
+端点: /api/v1/ppt/presentation/generate
+方法: POST
+Content-Type: application/json
-All /api/v1/ routes except /api/v1/auth/* require authentication. Send your Presenton admin username and password (same as the web UI, or AUTH_USERNAME / AUTH_PASSWORD when preseeding Docker). With curl, put them right after -u as -u USERNAME:PASSWORD — that is HTTP Basic auth and sets Authorization: Basic … for you. Replace the sample username:password below with your real credentials.
+身份验证(HTTP Basic):
+除 /api/v1/auth/* 外,所有 /api/v1/ 路由均需身份验证。请发送你的 Presenton 管理员用户名和密码(与 Web UI 相同,或在 Docker 预置时使用 AUTH_USERNAME / AUTH_PASSWORD)。使用 curl 时,在 -u 之后直接写 -u USERNAME:PASSWORD — 即 HTTP Basic 身份验证,会自动设置 Authorization: Basic …。请将下方示例中的 username:password 替换为你的真实凭据。
| Parameter | -Type | -Required | -Description | +参数 | +类型 | +必填 | +说明 |
|---|---|---|---|---|---|---|---|
content |
string | -Yes | -Main content used to generate the presentation. | +是 | +用于生成演示文稿的主要内容。 | ||
slides_markdown |
string[] | null | -No | -Provide custom slide markdown instead of auto-generation. | +否 | +提供自定义幻灯片 Markdown,而非自动生成。 | ||
instructions |
string | null | -No | -Additional generation instructions. | +否 | +额外的生成说明。 | ||
tone |
string | -No | +否 |
-Text tone (default: "default").
-Options: default, casual, professional,
-funny, educational, sales_pitch
+文本语气(默认:"default")。
+可选值:default、casual、professional、
+funny、educational、sales_pitch
|
|||
verbosity |
string | -No | +否 |
-Content density (default: "standard").
-Options: concise, standard, text-heavy
+内容密度(默认:"standard")。
+可选值:concise、standard、text-heavy
|
|||
web_search |
boolean | -No | -Enable web search grounding (default: false). |
+否 | +启用网络搜索 grounding(默认:false)。 |
||
n_slides |
integer | -No | -Number of slides to generate (default: 8). |
+否 | +要生成的幻灯片数量(默认:8)。 |
||
language |
string | -No | -Presentation language (default: "English"). |
+否 | +演示文稿语言(默认:"English")。 |
||
template |
string | -No | -Template name (default: "general"). |
+否 | +模板名称(默认:"general")。 |
||
include_table_of_contents |
boolean | -No | -Include table of contents slide (default: false). |
+否 | +包含目录页(默认:false)。 |
||
include_title_slide |
boolean | -No | -Include title slide (default: true). |
+否 | +包含标题页(默认:true)。 |
||
files |
string[] | null | -No | +否 |
-Files to use in generation.
-Upload first via /api/v1/ppt/files/upload.
+生成时使用的文件。
+请先通过 /api/v1/ppt/files/upload 上传。
|
|||
export_as |
string | -No | +否 |
-Export format (default: "pptx").
-Options: pptx, pdf
+导出格式(默认:"pptx")。
+可选值:pptx、pdf
|
{
"presentation_id": "string",
@@ -637,7 +638,7 @@ Options: pptx, pdf
"edit_path": "string"
}
-**Example (curl + HTTP Basic auth with -u)**
+**示例(curl + 使用 -u 的 HTTP Basic 身份验证)**
curl -u username:password \
-X POST http://localhost:5001/api/v1/ppt/presentation/generate \
@@ -650,7 +651,7 @@ Options: pptx, pdf
"export_as": "pptx"
}'
-**Example Response**
+**示例响应**
{
"presentation_id": "d3000f96-096c-4768-b67b-e99aed029b57",
@@ -659,43 +660,42 @@ Options: pptx, pdf
}
-Note: -Prepend your server’s root URL to-**Documentation & Tutorials** +**文档与教程** # -### 🚀 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)pathand -edit_pathto construct valid links. +注意: +在path和edit_path前加上服务器根 URL,即可构成有效链接。