feat: 新增插件系统、多种插件类型、开发指南及多语言文档。
This commit is contained in:
60
plugins/pipes/README.md
Normal file
60
plugins/pipes/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Pipes
|
||||
|
||||
English | [中文](./README_CN.md)
|
||||
|
||||
Pipes process and enhance LLM responses after they are generated and before they are displayed to the user. This directory contains various pipe plugins that can be used to extend OpenWebUI functionality.
|
||||
|
||||
## 📋 Pipe Plugins List
|
||||
|
||||
| Plugin Name | Description | Documentation |
|
||||
| :--- | :--- | :--- |
|
||||
| **Example Pipe** | A template/example for creating pipe plugins | [English](./example-pipe/README.md) / [中文](./example-pipe/README_CN.md) |
|
||||
| **AI Agent Pipe** | Transforms AI responses into complete agent workflows with multiple thinking rounds and tool calls | [English](./ai-agent-pipe/README.md) / [中文](./ai-agent-pipe/README_CN.md) |
|
||||
|
||||
## 🎯 What are Pipe Plugins?
|
||||
|
||||
Pipe plugins process the output from the LLM and can:
|
||||
|
||||
- Format responses (convert to markdown, JSON, tables, etc.)
|
||||
- Enhance responses with additional information
|
||||
- Translate or transform content
|
||||
- Filter or modify content before display
|
||||
- Add watermarks or metadata
|
||||
- Integrate with external services
|
||||
|
||||
Pipes are executed after the LLM generates a response but before the user sees it.
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Installing a Pipe Plugin
|
||||
|
||||
1. Download the plugin file (`.py`) to your local machine
|
||||
2. Open OpenWebUI Admin Settings and find the "Plugins" section
|
||||
3. Select the "Pipes" type
|
||||
4. Upload the downloaded file
|
||||
5. Refresh the page and enable the pipe in your chat settings
|
||||
6. The pipe will be applied to all subsequent LLM responses
|
||||
|
||||
## 📖 Development Guide
|
||||
|
||||
When adding a new pipe plugin, please follow these steps:
|
||||
|
||||
1. **Create Plugin Directory**: Create a new folder under `plugins/pipes/` (e.g., `my_pipe/`)
|
||||
2. **Write Plugin Code**: Create a `.py` file with clear documentation of functionality
|
||||
3. **Write Documentation**:
|
||||
- Create `README.md` (English version)
|
||||
- Create `README_CN.md` (Chinese version)
|
||||
- Include: feature description, configuration, usage examples, and troubleshooting
|
||||
4. **Update This List**: Add your plugin to the table above
|
||||
|
||||
## ⚙️ Best Practices for Pipe Development
|
||||
|
||||
- **Non-blocking Operations**: Keep pipe processing fast to avoid UI delays
|
||||
- **Error Handling**: Gracefully handle errors without breaking the response
|
||||
- **Configuration**: Make pipes configurable for different use cases
|
||||
- **Performance**: Test with large responses to ensure efficiency
|
||||
- **Documentation**: Provide clear examples and troubleshooting guides
|
||||
|
||||
---
|
||||
|
||||
> **Contributor Note**: We welcome contributions of new pipe plugins! Please provide clear and complete documentation for each new plugin, including features, configuration, usage examples, and troubleshooting guides.
|
||||
60
plugins/pipes/README_CN.md
Normal file
60
plugins/pipes/README_CN.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Pipes(管道插件)
|
||||
|
||||
[English](./README.md) | 中文
|
||||
|
||||
管道插件(Pipes)在 LLM 生成响应后、展示给用户前对响应进行处理和增强。此目录包含可用于扩展 OpenWebUI 功能的各种管道插件。
|
||||
|
||||
## 📋 管道插件列表
|
||||
|
||||
| 插件名称 | 描述 | 文档 |
|
||||
| :--- | :--- | :--- |
|
||||
| **示例管道** | 创建管道插件的模板/示例 | [中文](./example-pipe/README_CN.md) / [English](./example-pipe/README.md) |
|
||||
| **AI代理管道** | 将AI响应转换为完整的代理工作流程,包含多轮思考和工具调用 | [中文](./ai-agent-pipe/README_CN.md) / [English](./ai-agent-pipe/README.md) |
|
||||
|
||||
## 🎯 什么是管道插件?
|
||||
|
||||
管道插件对 LLM 的输出进行处理,可以:
|
||||
|
||||
- 格式化响应(转换为 Markdown、JSON、表格等)
|
||||
- 用附加信息增强响应
|
||||
- 翻译或转换内容
|
||||
- 在显示前过滤或修改内容
|
||||
- 添加水印或元数据
|
||||
- 与外部服务集成
|
||||
|
||||
管道在 LLM 生成响应之后、用户看到响应之前执行。
|
||||
|
||||
## 🚀 快速开始
|
||||
|
||||
### 安装管道插件
|
||||
|
||||
1. 将插件文件(`.py`)下载到本地
|
||||
2. 在 OpenWebUI 管理员设置中,找到"Plugins"部分
|
||||
3. 选择"Pipes"类型
|
||||
4. 上传下载的文件
|
||||
5. 刷新页面并在聊天设置中启用管道
|
||||
6. 该管道将应用于所有后续的 LLM 响应
|
||||
|
||||
## 📖 开发指南
|
||||
|
||||
添加新管道插件时,请遵循以下步骤:
|
||||
|
||||
1. **创建插件目录**:在 `plugins/pipes/` 下创建新文件夹(例如 `my_pipe/`)
|
||||
2. **编写插件代码**:创建 `.py` 文件,清晰记录功能说明
|
||||
3. **编写文档**:
|
||||
- 创建 `README.md`(英文版)
|
||||
- 创建 `README_CN.md`(中文版)
|
||||
- 包含:功能说明、配置方法、使用示例和故障排除
|
||||
4. **更新此列表**:在上述表格中添加您的插件
|
||||
|
||||
## ⚙️ 管道开发最佳实践
|
||||
|
||||
- **非阻塞操作**:保持管道处理快速以避免 UI 延迟
|
||||
- **错误处理**:优雅地处理错误而不破坏响应
|
||||
- **配置灵活性**:使管道可配置以适应不同用例
|
||||
- **性能优化**:使用大型响应测试以确保效率
|
||||
- **文档完整**:提供清晰的示例和故障排除指南
|
||||
|
||||
---
|
||||
|
||||
> **贡献者注意**:我们欢迎贡献新的管道插件!请为每个新增插件提供清晰完整的文档,包括功能说明、配置方法、使用示例和故障排除指南。
|
||||
54
plugins/pipes/gemini_mainfold/README.md
Normal file
54
plugins/pipes/gemini_mainfold/README.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Example Pipe Plugin
|
||||
|
||||
**Author:** OpenWebUI Community | **Version:** 1.0.0 | **License:** MIT
|
||||
|
||||
This is a template/example for creating Pipe plugins in OpenWebUI.
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Pipes are plugins that process and enhance LLM responses after they are generated and before they are displayed to the user.
|
||||
|
||||
## Core Features
|
||||
|
||||
- ✅ **Response Processing**: Modify or enhance LLM output
|
||||
- ✅ **Format Conversion**: Convert responses to different formats
|
||||
- ✅ **Content Filtering**: Filter or sanitize content
|
||||
- ✅ **Integration**: Connect with external services
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the `.py` file from this directory
|
||||
2. Open OpenWebUI Admin Settings → Plugins
|
||||
3. Select "Pipes" type
|
||||
4. Upload the file
|
||||
5. Refresh the page
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
Configure the pipe parameters in your chat settings as needed.
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
Once enabled, this pipe will automatically process all LLM responses.
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Check the logs for any errors during pipe execution
|
||||
- Ensure the pipe is properly configured
|
||||
- Verify the pipe is enabled in chat settings
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
Feel free to create your own pipe plugins! Follow the structure and documentation guidelines in this template.
|
||||
54
plugins/pipes/gemini_mainfold/README_CN.md
Normal file
54
plugins/pipes/gemini_mainfold/README_CN.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# 示例管道插件
|
||||
|
||||
**作者:** OpenWebUI 社区 | **版本:** 1.0.0 | **许可证:** MIT
|
||||
|
||||
这是在 OpenWebUI 中创建管道插件的模板/示例。
|
||||
|
||||
---
|
||||
|
||||
## 概述
|
||||
|
||||
管道是在 LLM 生成响应后、显示给用户前对响应进行处理和增强的插件。
|
||||
|
||||
## 核心特性
|
||||
|
||||
- ✅ **响应处理**: 修改或增强 LLM 输出
|
||||
- ✅ **格式转换**: 将响应转换为不同格式
|
||||
- ✅ **内容过滤**: 过滤或清理内容
|
||||
- ✅ **集成**: 与外部服务连接
|
||||
|
||||
---
|
||||
|
||||
## 安装
|
||||
|
||||
1. 从此目录下载 `.py` 文件
|
||||
2. 打开 OpenWebUI 管理员设置 → 插件(Plugins)
|
||||
3. 选择"Pipes"类型
|
||||
4. 上传文件
|
||||
5. 刷新页面
|
||||
|
||||
---
|
||||
|
||||
## 配置
|
||||
|
||||
根据需要在聊天设置中配置管道参数。
|
||||
|
||||
---
|
||||
|
||||
## 使用
|
||||
|
||||
启用后,该管道将自动处理所有 LLM 响应。
|
||||
|
||||
---
|
||||
|
||||
## 故障排除
|
||||
|
||||
- 查看日志了解管道执行过程中的任何错误
|
||||
- 确保管道配置正确
|
||||
- 验证管道在聊天设置中已启用
|
||||
|
||||
---
|
||||
|
||||
## 贡献
|
||||
|
||||
欢迎创建您自己的管道插件!请遵循此模板中的结构和文档指南。
|
||||
3382
plugins/pipes/gemini_mainfold/gemini_manifold.py
Normal file
3382
plugins/pipes/gemini_mainfold/gemini_manifold.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user