From c207bdad74fd12330a6fec04d7f8eb916fd2ae58 Mon Sep 17 00:00:00 2001 From: sligter <1771322848@qq.com> Date: Sat, 7 Mar 2026 17:10:16 +0800 Subject: [PATCH] feat: Enhance OpenAI integration with responses API and reasoning capabilities --- README.md | 10 ++++++---- README_EN.md | 9 +++++++-- src/landppt/web/templates/base.html | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9975161..59a2879 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ LandPPT 是一个基于大语言模型(LLM)的智能演示文稿生成平台,能够自动将文档内容转换为专业的PPT演示文稿。平台集成了多种AI模型、智能图像处理、深度研究功能和丰富的模板系统,让用户能够轻松创建高质量的演示文稿 -[文档指南](http://landppt-doc.52yyds.top/docs) +[在线体验站](https://cloud.landppt.com) | [文档指南](http://landppt-doc.52yyds.top/docs) ### 主界面 @@ -102,7 +102,7 @@ LandPPT 是一个基于大语言模型(LLM)的智能演示文稿生成平台 ## 核心功能 ### 多AI提供商支持 -- **OpenAI GPT系列**:GPT-4o、GPT-4o-mini 等模型 +- **OpenAI GPT系列**:GPT-4o、GPT-4o-mini 等模型,支持官方 Responses API 与 reasoning effort 推理程度参数 - **OpenAI兼容提供商**:DeepSeek、Kimi、MiniMax 等(通过 Base URL + API Key 接入) - **Anthropic Claude**:Claude-4 Sonnet、Claude-4 Haiku 系列模型 - **Google Gemini**:Gemini-2.5 Flash、Gemini-2.5 Pro 系列模型,支持自定义端点配置 @@ -342,6 +342,8 @@ MAX_TOKENS=8192 TEMPERATURE=0.7 ``` +说明:OpenAI 提供商可通过 `OPENAI_USE_RESPONSES_API=true` 切换到官方 `/v1/responses` 接口,并在启用 `OPENAI_ENABLE_REASONING=true` 后使用 `OPENAI_REASONING_EFFORT=low|medium|high` 配置推理程度。 + ## API文档 启动服务后访问: @@ -403,7 +405,7 @@ TEMPERATURE=0.7 ## 常见问题 ### Q: 支持哪些AI模型? -A: 支持 OpenAI、Anthropic Claude、Google Gemini、Ollama,以及 OpenAI 兼容提供商(DeepSeek / Kimi / MiniMax / 302.AI)。可以在配置页面切换不同的AI提供商。 +A: 支持 OpenAI、Anthropic Claude、Google Gemini、Ollama,以及 OpenAI 兼容提供商(DeepSeek / Kimi / MiniMax / 302.AI)。可以在配置页面切换不同的AI提供商。其中 OpenAI 提供商支持 Responses API 请求模式和 reasoning effort 推理程度参数。 ### Q: 如何配置图像功能? A: 在 `.env` 文件中配置相应的API密钥: @@ -454,7 +456,7 @@ A: 大多数AI提供商支持并发请求,但可能有不同的限制。建议 - **讨论区**: https://github.com/sligter/LandPPT/discussions - **交流群**: https://t.me/+EaOfoceoNwdhNDVlsh -![LandPPT](https://jsd.onmicrosoft.cn/gh/mydracula/image@master/20260225/9022b99e57584a7f9bcee9124d946c6c.png) +![LandPPT](https://jsd.onmicrosoft.cn/gh/mydracula/image@master/20260307/ac0535087c9f4cb9a9cca0090fd6fbf0.jpg) ---
diff --git a/README_EN.md b/README_EN.md index f9d8014..3817e08 100644 --- a/README_EN.md +++ b/README_EN.md @@ -41,6 +41,8 @@ If you're interested in my projects or have suitable collaboration opportunities LandPPT is an intelligent presentation generation platform powered by Large Language Models (LLMs) that automatically converts document content into professional PPT presentations. The platform integrates multiple AI models, intelligent image processing, deep research capabilities, and rich template systems, enabling users to effortlessly create high-quality presentations. +[Live Demo](https://cloud.landppt.com) + ### Main Interface ![image](https://img.pub/p/7d5c3c1a4b625abeb4c1.png) @@ -79,6 +81,7 @@ LandPPT is an intelligent presentation generation platform powered by Large Lang - **Visual Reference**: AI editing assistant supports image upload and visual content analysis - **Multiple File Upload**: Support uploading multiple files simultaneously for efficient batch processing - **Custom Model Selection**: Customize model selection by function module for precise cost control +- **Enhanced OpenAI Support**: Supports the official Responses API and configurable reasoning effort parameters - **Config Center**: Visual configuration for AI providers & models, one-click test, model list fetch, and role-based provider/model assignment - **Free Master Template**: AI-generated project-specific master template, responsive 16:9 edge-to-edge rendering, suitable for title/agenda/content/ending slides - **Notes Export**: Support exporting speech scripts to PPT notes @@ -89,7 +92,7 @@ LandPPT is an intelligent presentation generation platform powered by Large Lang ## Key Features ### Multi-AI Provider Support -- **OpenAI**: GPT-4o, GPT-4o-mini and other latest models +- **OpenAI**: GPT-4o, GPT-4o-mini and other latest models, with support for the official Responses API and reasoning effort parameters - **OpenAI-Compatible**: DeepSeek / Kimi / MiniMax / 302.AI (via Base URL + API Key) - **Anthropic Claude**: Claude-4 series models - **Google Gemini**: Gemini-2.5 series models with custom endpoint support @@ -331,6 +334,8 @@ MAX_TOKENS=8192 TEMPERATURE=0.7 ``` +Note: For the OpenAI provider, set `OPENAI_USE_RESPONSES_API=true` to use the official `/v1/responses` endpoint, and enable `OPENAI_ENABLE_REASONING=true` with `OPENAI_REASONING_EFFORT=low|medium|high` to control reasoning depth. + ## API Documentation After starting the service, visit: @@ -393,7 +398,7 @@ If you find bugs or have feature suggestions, please create a new issue on the [ ## FAQ ### Q: Which AI models are supported? -A: Supports OpenAI, Anthropic Claude, Google Gemini, Ollama, and OpenAI-compatible providers (DeepSeek / Kimi / MiniMax / 302.AI). You can switch providers in the configuration page. +A: Supports OpenAI, Anthropic Claude, Google Gemini, Ollama, and OpenAI-compatible providers (DeepSeek / Kimi / MiniMax / 302.AI). You can switch providers in the configuration page. The OpenAI provider also supports the Responses API request mode and reasoning effort parameters. ### Q: How to configure image functionality? A: Configure the corresponding API keys in the `.env` file: diff --git a/src/landppt/web/templates/base.html b/src/landppt/web/templates/base.html index b95f02e..54f1285 100644 --- a/src/landppt/web/templates/base.html +++ b/src/landppt/web/templates/base.html @@ -479,7 +479,7 @@