diff --git a/apps/prompt-optimizer/1.3.1/data.yml b/apps/prompt-optimizer/1.3.1/data.yml new file mode 100644 index 0000000..26c2972 --- /dev/null +++ b/apps/prompt-optimizer/1.3.1/data.yml @@ -0,0 +1,68 @@ +additionalProperties: + formFields: + - default: 8080 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web端口 + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: PROMPT_OPTIMIZER_PASSWORD + labelEn: Basic Auth Password (Optional) + labelZh: 访问密码 (可选) + random: true + required: false + rule: paramComplexity + type: password + - default: "" + edit: true + envKey: VITE_OPENAI_API_KEY + labelEn: OpenAI API Key (Optional) + labelZh: OpenAI API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_GEMINI_API_KEY + labelEn: Gemini API Key (Optional) + labelZh: Gemini API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_DEEPSEEK_API_KEY + labelEn: DeepSeek API Key (Optional) + labelZh: DeepSeek API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_SILICONFLOW_API_KEY + labelEn: SiliconFlow API Key (Optional) + labelZh: SiliconFlow API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_CUSTOM_API_KEY + labelEn: Custom API Key (Optional) + labelZh: 自定义 API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_CUSTOM_API_BASE_URL + labelEn: Custom API Base URL (Optional) + labelZh: 自定义 API 地址 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_CUSTOM_API_MODEL + labelEn: Custom API Model (Optional) + labelZh: 自定义 API 模型 (可选) + required: false + type: text \ No newline at end of file diff --git a/apps/prompt-optimizer/1.3.1/docker-compose.yml b/apps/prompt-optimizer/1.3.1/docker-compose.yml new file mode 100644 index 0000000..3c8720d --- /dev/null +++ b/apps/prompt-optimizer/1.3.1/docker-compose.yml @@ -0,0 +1,31 @@ +services: + prompt-optimizer: + image: linshen/prompt-optimizer:1.3.1 + container_name: ${CONTAINER_NAME} + restart: unless-stopped + ports: + - "${PANEL_APP_PORT_HTTP}:80" + environment: + ACCESS_USERNAME: "admin" + ACCESS_PASSWORD: "${PROMPT_OPTIMIZER_PASSWORD}" + VITE_OPENAI_API_KEY: "${VITE_OPENAI_API_KEY}" + VITE_GEMINI_API_KEY: "${VITE_GEMINI_API_KEY}" + VITE_DEEPSEEK_API_KEY: "${VITE_DEEPSEEK_API_KEY}" + VITE_SILICONFLOW_API_KEY: "${VITE_SILICONFLOW_API_KEY}" + VITE_CUSTOM_API_KEY: "${VITE_CUSTOM_API_KEY}" + VITE_CUSTOM_API_BASE_URL: "${VITE_CUSTOM_API_BASE_URL}" + VITE_CUSTOM_API_MODEL: "${VITE_CUSTOM_API_MODEL}" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + labels: + createdBy: "Apps" + networks: + - 1panel-network + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/prompt-optimizer/README.md b/apps/prompt-optimizer/README.md new file mode 100644 index 0000000..9321639 --- /dev/null +++ b/apps/prompt-optimizer/README.md @@ -0,0 +1,48 @@ +# Prompt Optimizer (提示词优化器) 🚀 + +## 📖 项目简介 +Prompt Optimizer 是一款强大的 AI 提示词优化工具,旨在帮助用户轻松编写、优化和测试高质量的提示词。它支持多种主流的大语言模型,并提供直观的可视化界面,让提示词工程变得简单高效。 + +![](https://cdn.jsdelivr.net/gh/xiaoY233/PicList@main/public/assets/prompt-optimizer.png) + +![](https://img.shields.io/badge/Copyright-arch3rPro-ff9800?style=flat&logo=github&logoColor=white) + +## ✨ 核心特性 +- **智能优化**:一键优化提示词,支持多轮迭代改进,提升AI回复准确度。 +- **双模式优化**:支持系统提示词优化和用户提示词优化,满足不同使用场景。 +- **对比测试**:支持原始提示词和优化后提示词的实时对比,直观展示优化效果。 +- **多模型集成**:支持 OpenAI、Gemini、DeepSeek、智谱 AI、SiliconFlow 等主流 AI 模型,并支持自定义 API。 +- **安全架构**:纯客户端处理,数据直接与 AI 服务商交互,不经过中间服务器。 +- **访问控制**:支持密码保护功能,保障部署安全。 + +## ⚙️ API密钥配置 +### 方式一:通过界面配置(推荐) +1. 点击界面右上角的"⚙️设置"按钮 +2. 选择"模型管理"选项卡 +3. 点击需要配置的模型(如OpenAI、Gemini、DeepSeek等) +4. 在弹出的配置框中输入对应的API密钥 +5. 点击"保存"即可 + +支持的模型:OpenAI、Gemini、DeepSeek、Zhipu智谱、SiliconFlow、自定义API(OpenAI兼容接口) + +### 方式二:通过环境变量配置 +你可以在安装应用时,在表单中直接填写常用的 API 密钥。支持的环境变量如下: +- `VITE_OPENAI_API_KEY` +- `VITE_GEMINI_API_KEY` +- `VITE_DEEPSEEK_API_KEY` +- `VITE_SILICONFLOW_API_KEY` +- `VITE_CUSTOM_API_KEY` +- `VITE_CUSTOM_API_BASE_URL` +- `VITE_CUSTOM_API_MODEL` + +## 常见问题 FAQ +- **Q: 为什么配置好 API 密钥后仍然无法连接?** + A: 大多数情况是由网络或跨域问题(CORS)导致的。如果你的模型服务部署在本地(如 Ollama),请确保正确配置了跨域策略。对于云服务商,如果遇到连接问题,可以尝试在模型设置中开启 Vercel 代理(如果可用)。 +- **Q: 如何修改访问密码?** + A: 你需要重新配置应用,在安装时设置新的密码。 + +## 相关链接 +- 官网: [https://prompt.always200.com/](https://prompt.always200.com/) +- GitHub: [https://github.com/linshenkx/prompt-optimizer](https://github.com/linshenkx/prompt-optimizer) +- 文档: [https://github.com/linshenkx/prompt-optimizer/blob/develop/docs/index.md](https://github.com/linshenkx/prompt-optimizer/blob/develop/docs/index.md) + diff --git a/apps/prompt-optimizer/README_EN.md b/apps/prompt-optimizer/README_EN.md new file mode 100644 index 0000000..a94643a --- /dev/null +++ b/apps/prompt-optimizer/README_EN.md @@ -0,0 +1,49 @@ +# Prompt Optimizer 🚀 + +## 📖 Project Introduction +Prompt Optimizer is a powerful AI prompt optimization tool that helps you write better AI prompts and improve the quality of AI outputs. It supports various mainstream large language models and provides an intuitive visual interface, making prompt engineering simple and efficient. + + +![](https://cdn.jsdelivr.net/gh/xiaoY233/PicList@main/public/assets/prompt-optimizer.png) + +![](https://img.shields.io/badge/Copyright-arch3rPro-ff9800?style=flat&logo=github&logoColor=white) + + +## ✨ Core Features +- **Intelligent Optimization**: One-click optimization of prompts with support for multi-round iterative improvements to enhance AI response accuracy. +- **Dual Mode Optimization**: Supports both system prompt and user prompt optimization to meet different usage scenarios. +- **Comparison Testing**: Allows real-time comparison between original and optimized prompts to intuitively demonstrate the optimization effect. +- **Multi-Model Integration**: Supports mainstream AI models such as OpenAI, Gemini, DeepSeek, Zhipu AI, SiliconFlow, and custom APIs. +- **Secure Architecture**: Pure client-side processing, with data directly interacting with AI service providers without passing through intermediate servers. +- **Access Control**: Supports password protection to secure your deployment. + +## ⚙️ API Key Configuration +### Method 1: Via Interface (Recommended) +1. Click the "⚙️Settings" button in the upper right corner. +2. Select the "Model Management" tab. +3. Click on the model you need to configure (e.g., OpenAI, Gemini, DeepSeek). +4. Enter the corresponding API key in the configuration box. +5. Click "Save". + +Supported models: OpenAI, Gemini, DeepSeek, Zhipu AI, SiliconFlow, Custom API (OpenAI compatible interface). + +### Method 2: Via Environment Variables +You can fill in common API keys directly in the form when installing the application. The following environment variables are supported: +- `VITE_OPENAI_API_KEY` +- `VITE_GEMINI_API_KEY` +- `VITE_DEEPSEEK_API_KEY` +- `VITE_SILICONFLOW_API_KEY` +- `VITE_CUSTOM_API_KEY` +- `VITE_CUSTOM_API_BASE_URL` +- `VITE_CUSTOM_API_MODEL` + +## FAQ +- **Q: Why can't I connect after configuring the API key?** + A: Most connection issues are caused by network problems or Cross-Origin Resource Sharing (CORS). If your model service is deployed locally (e.g., Ollama), ensure that CORS is configured correctly. For cloud providers, if you encounter connection problems, try enabling the Vercel proxy in the model settings if available. +- **Q: How to change the access password?** + A: You need to reconfigure the application and set a new password during installation. + +## Links +- Website: [https://prompt.always200.com/](https://prompt.always200.com/) +- GitHub: [https://github.com/linshenkx/prompt-optimizer](https://github.com/linshenkx/prompt-optimizer) +- Docs: [https://github.com/linshenkx/prompt-optimizer/blob/develop/docs/index.md](https://github.com/linshenkx/prompt-optimizer/blob/develop/docs/index.md) \ No newline at end of file diff --git a/apps/prompt-optimizer/data.yml b/apps/prompt-optimizer/data.yml new file mode 100644 index 0000000..b1463ec --- /dev/null +++ b/apps/prompt-optimizer/data.yml @@ -0,0 +1,31 @@ +name: Prompt Optimizer + +tags: + - AI + - LLM + - Prompt +title: 高质量提示词优化器 +description: 一款提示词优化器,助力于编写高质量的提示词,支持多种大语言模型,提供可视化界面和 API。 +additionalProperties: + key: prompt-optimizer + name: Prompt Optimizer + tags: + - AI + - LLM + - Prompt + - Tool + shortDescZh: 一款提示词优化器,助力于编写高质量的提示词。 + shortDescEn: An optimizer for crafting high-quality prompts. + description: + zh: Prompt Optimizer 是一款强大的提示词(Prompt)优化工具,旨在帮助用户轻松编写、优化和测试高质量的提示词。它支持多种主流的大语言模型(LLM),并提供直观的可视化界面,让提示词工程变得简单高效。 + en: Prompt Optimizer is a powerful tool designed to help users easily write, optimize, and test high-quality prompts. It supports various mainstream Large Language Models (LLMs) and provides an intuitive visual interface to make prompt engineering simple and efficient. + type: website + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://prompt.always200.com/ + github: https://github.com/linshenkx/prompt-optimizer + document: https://github.com/linshenkx/prompt-optimizer/blob/develop/docs/index.md + architectures: + - amd64 + - arm64 \ No newline at end of file diff --git a/apps/prompt-optimizer/latest/data.yml b/apps/prompt-optimizer/latest/data.yml new file mode 100644 index 0000000..26c2972 --- /dev/null +++ b/apps/prompt-optimizer/latest/data.yml @@ -0,0 +1,68 @@ +additionalProperties: + formFields: + - default: 8080 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Web Port + labelZh: Web端口 + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: PROMPT_OPTIMIZER_PASSWORD + labelEn: Basic Auth Password (Optional) + labelZh: 访问密码 (可选) + random: true + required: false + rule: paramComplexity + type: password + - default: "" + edit: true + envKey: VITE_OPENAI_API_KEY + labelEn: OpenAI API Key (Optional) + labelZh: OpenAI API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_GEMINI_API_KEY + labelEn: Gemini API Key (Optional) + labelZh: Gemini API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_DEEPSEEK_API_KEY + labelEn: DeepSeek API Key (Optional) + labelZh: DeepSeek API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_SILICONFLOW_API_KEY + labelEn: SiliconFlow API Key (Optional) + labelZh: SiliconFlow API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_CUSTOM_API_KEY + labelEn: Custom API Key (Optional) + labelZh: 自定义 API 密钥 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_CUSTOM_API_BASE_URL + labelEn: Custom API Base URL (Optional) + labelZh: 自定义 API 地址 (可选) + required: false + type: text + - default: "" + edit: true + envKey: VITE_CUSTOM_API_MODEL + labelEn: Custom API Model (Optional) + labelZh: 自定义 API 模型 (可选) + required: false + type: text \ No newline at end of file diff --git a/apps/prompt-optimizer/latest/docker-compose.yml b/apps/prompt-optimizer/latest/docker-compose.yml new file mode 100644 index 0000000..c8e9ae5 --- /dev/null +++ b/apps/prompt-optimizer/latest/docker-compose.yml @@ -0,0 +1,31 @@ +services: + prompt-optimizer: + image: linshen/prompt-optimizer:latest + container_name: ${CONTAINER_NAME} + restart: unless-stopped + ports: + - "${PANEL_APP_PORT_HTTP}:80" + environment: + ACCESS_USERNAME: "admin" + ACCESS_PASSWORD: "${PROMPT_OPTIMIZER_PASSWORD}" + VITE_OPENAI_API_KEY: "${VITE_OPENAI_API_KEY}" + VITE_GEMINI_API_KEY: "${VITE_GEMINI_API_KEY}" + VITE_DEEPSEEK_API_KEY: "${VITE_DEEPSEEK_API_KEY}" + VITE_SILICONFLOW_API_KEY: "${VITE_SILICONFLOW_API_KEY}" + VITE_CUSTOM_API_KEY: "${VITE_CUSTOM_API_KEY}" + VITE_CUSTOM_API_BASE_URL: "${VITE_CUSTOM_API_BASE_URL}" + VITE_CUSTOM_API_MODEL: "${VITE_CUSTOM_API_MODEL}" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 5s + labels: + createdBy: "Apps" + networks: + - 1panel-network + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/prompt-optimizer/logo.png b/apps/prompt-optimizer/logo.png new file mode 100644 index 0000000..5059ea3 Binary files /dev/null and b/apps/prompt-optimizer/logo.png differ