presenton/presenton

GitHub Trending (daily) 工具

摘要

Presenton是一个开源的AI演示文稿生成器,允许用户通过API或桌面应用程序创建演示文稿,完全控制模型和数据,支持多种AI提供商和本地模型。

开源AI演示文稿生成器和API(Gamma、Beautiful AI、Decktopus替代品)
查看原文
查看缓存全文

缓存时间: 2026/05/23 12:18

快速入门 · 文档 · Youtube · Discord

你可以通过两种方式运行 Presenton:使用 Docker 进行一键式部署(无需搭建本地开发环境),或者使用 Electron 桌面应用以获得原生体验(适合开发或离线使用)。

将 Presenton 作为原生桌面应用运行。大语言模型(LLM)和图片提供方(API 密钥等)可在应用内配置。运行捆绑后端时,适用于 Docker 的环境变量同样生效。

前置条件:Node.js(LTS 版本)、npm、Python 3.11 以及 uv(用于 servers/fastapi 中的共享 FastAPI 后端)。

cd electron
npm run setup:env
npm run dev

此命令会编译 TypeScript 并启动 Electron。后端和用户界面在桌面窗口内本地运行。

npm run build:all
npm run dist

输出文件会写入 electron/dist 目录(或根据 electron-builder 配置的路径)。


Docker 部署

docker run -it --name presenton -p 5000:80 -v "./app_data:/app_data" ghcr.io/presenton/presenton:latest

Windows(PowerShell)用户请使用:

docker run -it --name presenton -p 5000:80 -v "${PWD}\app_data:/app_data" ghcr.io/presenton/presenton:latest

在浏览器中打开 http://localhost:5000 即可使用 Presenton。

注意: 你可以将 5000 替换为任意端口号,从而让 Presenton 使用其他端口运行。


环境变量与配置示例

# OpenAI + DALL·E 3
docker run -it --name presenton -p 5000: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
# Google Gemini
docker run -it --name presenton -p 5000: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
# Vertex AI
docker run -it --name presenton -p 5000: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
# Azure OpenAI
docker run -it --name presenton -p 5000: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
# AWS Bedrock
docker run -it --name presenton -p 5000: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
# Fireworks AI
docker run -it --name presenton -p 5000: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
# Together AI
docker run -it --name presenton -p 5000: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
# Ollama(本地模型)
docker run -it --name presenton -p 5000: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
# Anthropic
docker run -it --name presenton -p 5000: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
# LM Studio
docker run -it --name presenton -p 5000: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
# 自定义 LLM(通用 OpenAI 兼容接口)
docker run -it -p 5000: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
# 使用 GPU 运行 Ollama
docker run -it --name presenton --gpus=all -p 5000: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
# 使用兼容 OpenAI 的图片生成接口
docker run -it --name presenton -p 5000: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 使用示例

端点: POST /api/v1/ppt/presentation/generate
Content-Type: application/json

身份验证(HTTP Basic): 所有 /api/v1/ 路由(/api/v1/auth/* 除外)都需要身份验证。请提供 Presenton 管理员用户名和密码(与 Web UI 凭据相同,或在 Docker 中预置 AUTH_USERNAME / AUTH_PASSWORD)。使用 curl 时,直接在 -u 参数后填写 USERNAME:PASSWORD——这会自动设置 HTTP Basic 认证头 Authorization: Basic ...。请将下方示例中的用户名和密码替换为你的真实凭据。

请求体:

{
  "presentation_id": "string",
  "path": "string",
  "edit_path": "string"
}

curl 命令示例:

curl -u username:password \
  -X POST http://localhost:5000/api/v1/ppt/presentation/generate \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Introduction to Machine Learning",
    "n_slides": 5,
    "language": "English",
    "template": "general",
    "export_as": "pptx"
  }'

响应示例:

{
  "presentation_id": "d3000f96-096c-4768-b67b-e99aed029b57",
  "path": "/app_data/d3000f96-096c-4768-b67b-e99aed029b57/Introduction_to_Machine_Learning.pptx",
  "edit_path": "/presentation?id=d3000f96-096c-4768-b67b-e99aed029b57"
}

注意: 请在 pathedit_path 前拼接你服务器的根 URL,以构造有效的完整链接。

相似文章

PageOn.AI 3.0

Product Hunt

<p>更智能的幻灯片、海报与信息图视觉助手</p><p><a href="https://www.producthunt.com/products/pageon-ai?utm_campaign=producthunt-atom-posts-feed&utm_medium=rss-feed&utm_source=producthunt-atom-posts-feed">讨论</a> | <a href="https://www.producthunt.com/r/p/1127796?app_id=339">链接</a></p>

PaneFlow

Product Hunt

PaneFlow让AI智能体构建真正的动画幻灯片,将AI生成的内容与动态演示功能相结合。

Presentify

Product Hunt

Presentify 是一款旨在帮助用户提升演讲技巧的产品。

PresentAgent-2: 迈向通用多模态演示代理

Hugging Face Daily Papers

PresentAgent-2 是一个智能体框架,通过开展调研、创建多模态幻灯片并生成跨单人、讨论和互动模式的交互式内容,根据用户查询生成演示视频。