popai-powerpoint-pptx
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePopAI PPT Skill
PopAI PPT Skill
Create presentations programmatically via PopAI's API. The API has powerful built-in research and information gathering capabilities — it will automatically search, collect, and organize relevant content. Optionally upload files as reference material or templates. If a template is provided, the output will fully preserve the template's layout, styles, and design — 100% faithful reproduction based on your template. After initial generation, you can send follow-up modification instructions using the same channel ID.
.pptx通过 PopAI API 编程式创建演示文稿。该 API 内置强大的研究和信息收集能力,可以自动搜索、收集并整理相关内容。可选择上传文件作为参考素材或模板。如果提供了 模板,输出结果会完全保留模板的布局、样式和设计,100% 忠实还原你的模板。首次生成后,你可以使用相同的 channel ID 发送后续修改指令。
.pptxSetup
配置步骤
- Ask user to sign up and obtain their Access Token at: https://www.popai.pro/popai-skill
- Once user provides the token, set it in environment:
export POPAI_ACCESS_TOKEN=<token>
Tips: You can save the key in for future reference.
TOOLS.md- 请用户前往 https://www.popai.pro/popai-skill 注册并获取 Access Token
- 用户提供 token 后,将其设置到环境变量中:
export POPAI_ACCESS_TOKEN=<token>
提示:你可以将密钥保存在 中供后续使用。
TOOLS.mdScripts
脚本
- - Generate PPT via PopAI API (upload files → create channel → SSE stream → get pptx); also supports multi-round modification via
generate_ppt.py--channel-id
- - 通过 PopAI API 生成 PPT(上传文件 → 创建频道 → SSE 流 → 获取 pptx);也支持通过
generate_ppt.py参数进行多轮修改--channel-id
Usage Examples
使用示例
bash
undefinedbash
undefinedGenerate PPT from topic only
Generate PPT from topic only
python3 generate_ppt.py --query "AI Development Trends Report"
python3 generate_ppt.py --query "AI Development Trends Report"
With reference files (max 5)
With reference files (max 5)
python3 generate_ppt.py --query "Tesla Earnings PPT" --file data.pdf chart.png
python3 generate_ppt.py --query "Tesla Earnings PPT" --file data.pdf chart.png
With a PPT template file (applied as layout template)
With a PPT template file (applied as layout template)
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx
With both template and reference files
With both template and reference files
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx --file data.pdf chart.png
python3 generate_ppt.py --query "Tesla Annual Report" --tpl template.pptx --file data.pdf chart.png
Multi-round modification: modify an existing PPT (template cannot be changed)
Multi-round modification: modify an existing PPT (template cannot be changed)
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Add a competitive analysis slide and make the color scheme blue"
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Add a competitive analysis slide and make the color scheme blue"
With URLs as reference material (included in query)
With URLs as reference material (included in query)
python3 generate_ppt.py --query "Create a PPT summarizing this article: https://example.com/report.html"
python3 generate_ppt.py --query "Create a PPT summarizing this article: https://example.com/report.html"
Multi-round modification with additional reference files
Multi-round modification with additional reference files
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Update the financial data with this new report" --file new_data.pdf
undefinedpython3 generate_ppt.py --channel-id "CHANNEL_ID" --query "Update the financial data with this new report" --file new_data.pdf
undefinedAgent Steps
Agent 执行步骤
Initial Generation
首次生成
- Get PPT topic from user
- If user provides reference material:
- Local files: pass as (max 5) and/or
--file(PPT template for layout)--tpl - URLs: include directly in the text — the API will fetch and process them automatically
--query
- Local files: pass as
- Run script (timeout: 1200000):
Tell user: "Generating your PPT, estimated 5 minutes..."bash
python3 generate_ppt.py --query "TOPIC" [--file FILE1 FILE2 ...] [--tpl TEMPLATE.pptx] - While the script is running, monitor stdout JSON lines and report progress to user in real time (e.g. task status updates, search actions, tool results)
- When generation completes, present final results to user:
- Show text (from
summaryevent) as the generation summaryNODE_END - Show as the download link: "Download PPT: <pptx_url>"
pptx_url - Show as the site link: "View/Edit online: <web_url>"
web_url
- Show
- If user requests the pptx file directly, download it from and deliver the file to user
pptx_url - Save the from
channel_id(last path segment ofweb_url) for potential follow-up modificationshttps://www.popai.pro/agentic-pptx/<channelId>
- 从用户处获取 PPT 主题
- 如果用户提供了参考素材:
- 本地文件:作为 参数传入(最多 5 个),和/或作为
--file参数传入(用于布局的 PPT 模板)--tpl - URL 链接:直接包含在 文本中,API 会自动抓取并处理
--query
- 本地文件:作为
- 运行脚本(超时时间:1200000 毫秒):
告知用户:"Generating your PPT, estimated 5 minutes..."bash
python3 generate_ppt.py --query "TOPIC" [--file FILE1 FILE2 ...] [--tpl TEMPLATE.pptx] - 脚本运行过程中,监听标准输出的 JSON 行,实时向用户同步进度(例如任务状态更新、搜索动作、工具返回结果等)
- 生成完成后,向用户展示最终结果:
- 展示 事件中的
NODE_END文本作为生成摘要summary - 展示 作为下载链接:"Download PPT: <pptx_url>"
pptx_url - 展示 作为站点链接:"View/Edit online: <web_url>"
web_url
- 展示
- 如果用户直接需要 pptx 文件,从 下载文件并交付给用户
pptx_url - 保存 中的
web_url(是channel_id的最后一段路径),用于后续可能的修改操作https://www.popai.pro/agentic-pptx/<channelId>
Multi-Round Modification
多轮修改
Use when the user wants to revise or improve an already-generated PPT (e.g. "add a slide", "change the title", "use a darker theme").
Rules:
- Required: (from previous generation) +
--channel-id(modification instruction)--query - Optional: to supply new reference files for the revision
--file - Not supported: is ignored in modify mode — the original template cannot be changed
--tpl
- Confirm the from the previous generation (stored from
channel_id)web_url - Get modification instruction from user
- If user provides additional reference files, pass as
--file - Run script (timeout: 1200000):
Tell user: "Applying your modifications, estimated 3-5 minutes..."bash
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "MODIFICATION_INSTRUCTION" [--file FILE1 ...] - Parse and present results the same way as initial generation (new and
pptx_url)web_url
当用户需要修订或优化已生成的 PPT 时使用(例如 "add a slide"、"change the title"、"use a darker theme")。
规则:
- 必填参数:(来自上一次生成) +
--channel-id(修改指令)--query - 可选参数:用于为修订提供新的参考文件
--file - 不支持:修改模式下会忽略 参数,无法更换原始模板
--tpl
- 确认上一次生成对应的 (从
channel_id中存储的)web_url - 从用户处获取修改指令
- 如果用户提供了额外的参考文件,作为 参数传入
--file - 运行脚本(超时时间:1200000 毫秒):
告知用户:"Applying your modifications, estimated 3-5 minutes..."bash
python3 generate_ppt.py --channel-id "CHANNEL_ID" --query "MODIFICATION_INSTRUCTION" [--file FILE1 ...] - 按照首次生成的方式解析并展示结果(新的 和
pptx_url)web_url
Output
输出
Event types (stdout, one JSON per line):
json
{"type": "task", "id": "1", "content": "Search for Tesla latest earnings data", "status": "progressing"}
{"type": "search", "action": "Web Searching", "results": [{"title": "...", "url": "...", "snippet": "...", "date": "..."}]}
{"type": "tool_result", "event": "TOOL_CALLS-xxx", "action": "...", "result": "..."}
{"type": "summary", "text": "Tesla earnings PPT has been created..."}
{"type": "stream_end"}Final result ():
is_end: truejson
{
"type": "pptx_ready",
"is_end": true,
"pptx_url": "https://popai-file-boe.s3-accelerate.amazonaws.com/.../xxx.pptx",
"file_name": "xxx.pptx",
"preview_images": ["https://...0.jpeg"],
"preview_count": xx,
"web_url": "https://www.popai.pro/agentic-pptx/<channelId>"
}- : Download link for the .pptx file
pptx_url - : PopAI site link for online viewing and editing
web_url - : Page-by-page screenshots of the generated PPT (one image per slide)
preview_images - : Total number of preview images (i.e. number of slides)
preview_count - : Final summary text from the
summaryevent, shown to the user as a generation recapNODE_END
事件类型(标准输出,每行一个 JSON):
json
{"type": "task", "id": "1", "content": "Search for Tesla latest earnings data", "status": "progressing"}
{"type": "search", "action": "Web Searching", "results": [{"title": "...", "url": "...", "snippet": "...", "date": "..."}]}
{"type": "tool_result", "event": "TOOL_CALLS-xxx", "action": "...", "result": "..."}
{"type": "summary", "text": "Tesla earnings PPT has been created..."}
{"type": "stream_end"}最终结果():
is_end: truejson
{
"type": "pptx_ready",
"is_end": true,
"pptx_url": "https://popai-file-boe.s3-accelerate.amazonaws.com/.../xxx.pptx",
"file_name": "xxx.pptx",
"preview_images": ["https://...0.jpeg"],
"preview_count": xx,
"web_url": "https://www.popai.pro/agentic-pptx/<channelId>"
}- :.pptx 文件的下载链接
pptx_url - :用于在线查看和编辑的 PopAI 站点链接
web_url - :生成的 PPT 逐页截图(每张图片对应一页幻灯片)
preview_images - :预览图片总数量(即幻灯片页数)
preview_count - :来自
summary事件的最终摘要文本,作为生成回顾展示给用户NODE_END
Support
支持
For any issues, contact customerservice@popai.pro
如有任何问题,请联系 customerservice@popai.pro
Technical Notes
技术说明
- Streaming: SSE stream; event contains final .pptx download URL;
TOOL_CALLS-pptxmarks stream endlast:true - File Upload: Presigned POST to S3 via , supports any file type
getPresignedPost - Timeout: Generation typically takes ~5 minutes;
- Channel ID: Extractable from — last path segment of
web_urlhttps://www.popai.pro/agentic-pptx/<channelId> - Multi-round: Calls directly with existing
send_generate;channel_idis never passed (template is fixed after channel creation)tpl_info
- 流式传输:SSE 流;事件包含最终的 .pptx 下载链接;
TOOL_CALLS-pptx标记流结束last:true - 文件上传:通过 预签名 POST 请求上传到 S3,支持任意文件类型
getPresignedPost - 超时:生成通常耗时约 5 分钟
- Channel ID:可从 中提取,即
web_url的最后一段路径https://www.popai.pro/agentic-pptx/<channelId> - 多轮修改:直接使用现有 调用
channel_id接口;不会传入send_generate(频道创建后模板即固定)tpl_info