Compare commits

...

44 Commits

Author SHA1 Message Date
Jeff
30cde9e871 Merge pull request #36 from Fu-Jie/feature/copilot-sdk-fix
fix(pipes): sync copilot sdk thinking
2026-01-27 04:26:08 +08:00
fujie
ac50cd249a fix(pipes): sync copilot sdk thinking
- Fix thinking visibility by passing user overrides into streaming

- Harden UserValves handling for mapping/instance inputs

- Update bilingual README with per-user valves and troubleshooting
2026-01-27 04:22:36 +08:00
github-actions[bot]
927db6dbaa chore: update community stats - points increased (155 -> 157) 2026-01-26 18:13:33 +00:00
github-actions[bot]
376c398ac7 chore: update community stats - followers increased (161 -> 162) 2026-01-26 12:15:53 +00:00
github-actions[bot]
a167a3cf83 chore: update community stats - followers increased (160 -> 161) 2026-01-26 11:09:11 +00:00
github-actions[bot]
c51e7dfdf7 chore: update community stats - followers increased (159 -> 160) 2026-01-26 10:10:58 +00:00
github-actions[bot]
1d4d13b34b chore: update community stats - points increased (154 -> 155), followers increased (158 -> 159) 2026-01-26 09:15:49 +00:00
github-actions[bot]
18e8775f38 chore: update community stats - points increased (152 -> 154) 2026-01-26 08:12:51 +00:00
fujie
813b019653 release: GitHub Copilot SDK Pipe v0.1.1 2026-01-26 15:29:26 +08:00
github-actions[bot]
b0b1542939 chore: update community stats - new plugin added (18 -> 19), plugin version updated, points increased (148 -> 152), followers increased (157 -> 158) 2026-01-26 07:14:37 +00:00
github-actions[bot]
15f19d8b8d chore: update community stats - points increased (147 -> 148) 2026-01-26 00:38:32 +00:00
fujie
82253b114c feat(copilot-sdk): release v0.1.1 - remove db dependency, add timeout, fix streaming
- Remove database dependency for session management, use chat_id directly
- Add TIMEOUT valve (default 300s)
- Fix streaming issues by handling full message events
- Improve chat_id extraction and tool detection
- Update docs and bump version to 0.1.1
2026-01-26 07:25:01 +08:00
github-actions[bot]
e0bfbf6dd4 chore: update community stats - points increased (146 -> 147) 2026-01-25 19:07:08 +00:00
github-actions[bot]
4689e80e7a chore: update community stats - points increased (144 -> 146) 2026-01-25 11:07:02 +00:00
github-actions[bot]
556e6c1c67 chore: update community stats - new plugin added (17 -> 18), plugin version updated, points increased (143 -> 144) 2026-01-25 10:08:13 +00:00
github-actions[bot]
3ab84a526d chore: update community stats - followers increased (156 -> 157) 2026-01-25 02:55:55 +00:00
github-actions[bot]
bdce96f912 chore: update community stats - followers increased (155 -> 156) 2026-01-24 17:06:50 +00:00
github-actions[bot]
4811b99a4b chore: update community stats - followers increased (154 -> 155) 2026-01-24 05:08:58 +00:00
github-actions[bot]
fb2a64c07a chore: update community stats - followers increased (153 -> 154) 2026-01-23 20:09:48 +00:00
github-actions[bot]
e023e4f2e2 chore: update community stats - followers increased (152 -> 153) 2026-01-23 07:12:10 +00:00
github-actions[bot]
0b16b1e0f4 chore: update community stats - followers increased (151 -> 152) 2026-01-22 21:09:33 +00:00
github-actions[bot]
59073ad7ac chore: update community stats - points increased (141 -> 143) 2026-01-22 20:10:29 +00:00
github-actions[bot]
8248644c45 chore: update community stats - points increased (140 -> 141) 2026-01-22 16:13:08 +00:00
github-actions[bot]
f38e6394c9 chore: update community stats - points increased (136 -> 140) 2026-01-22 15:13:08 +00:00
github-actions[bot]
0aaa529c6b chore: update community stats - followers increased (150 -> 151) 2026-01-22 13:23:00 +00:00
github-actions[bot]
b81a6562a1 chore: update community stats - points increased (135 -> 136) 2026-01-22 11:10:17 +00:00
github-actions[bot]
c5b10db23a chore: update community stats - followers increased (149 -> 150) 2026-01-22 09:14:48 +00:00
github-actions[bot]
d16e444643 chore: update community stats - followers increased (148 -> 149) 2026-01-22 07:13:25 +00:00
github-actions[bot]
8202468099 chore: update community stats - followers increased (147 -> 148) 2026-01-22 06:13:25 +00:00
github-actions[bot]
766e8bd20f chore: update community stats - followers increased (146 -> 147) 2026-01-22 02:51:30 +00:00
github-actions[bot]
1214ab5a8c chore: update community stats - followers increased (145 -> 146) 2026-01-21 21:13:00 +00:00
github-actions[bot]
ebddbb25f8 chore: update community stats - followers increased (144 -> 145) 2026-01-21 15:13:27 +00:00
github-actions[bot]
59545e1110 chore: update community stats - plugin version updated, followers increased (143 -> 144) 2026-01-21 14:14:42 +00:00
fujie
500e090b11 fix: resolve TypeError and improve Pydantic compatibility in async-context-compression v1.2.2 2026-01-21 21:51:58 +08:00
github-actions[bot]
a75ee555fa chore: update community stats - followers increased (142 -> 143) 2026-01-21 13:22:53 +00:00
github-actions[bot]
6a8c2164cd chore: update community stats - followers increased (141 -> 142) 2026-01-21 12:15:46 +00:00
github-actions[bot]
7f7efa325a chore: update community stats - followers increased (140 -> 141) 2026-01-21 04:25:49 +00:00
github-actions[bot]
9ba6cb08fc chore: update community stats - followers increased (139 -> 140) 2026-01-20 20:27:29 +00:00
github-actions[bot]
1872271a2d chore: update community stats - new plugin added (16 -> 17), plugin version updated, points increased (134 -> 135) 2026-01-20 13:23:26 +00:00
fujie
813b50864a docs(folder-memory): add prerequisites section and enhance release workflow with README links
- Add 'Prerequisites' section to folder-memory README files clarifying that conversations must occur inside a folder
- Update docs/plugins/filters/folder-memory.md and folder-memory.zh.md with same prerequisites
- Enhance extract_plugin_versions.py to auto-generate GitHub README URLs in release notes
- Update plugin-development workflow to document README link requirements for publishing
2026-01-20 20:35:06 +08:00
github-actions[bot]
b18cefe320 chore: update community stats - followers increased (137 -> 139) 2026-01-20 12:15:40 +00:00
fujie
a54c359fcf docs(filters): remove language switchers and legacy references from folder-memory docs 2026-01-20 20:11:00 +08:00
fujie
8d83221a4a docs(filters): add author and project info to folder-memory READMEs and docs 2026-01-20 20:08:52 +08:00
fujie
1879000720 docs(filters): add 'What's New' section to folder-memory READMEs and docs
- Add prominent 'What's New' section to README.md, README_CN.md, and global docs.
- Ensure compliance with plugin development standards.
2026-01-20 20:07:46 +08:00
37 changed files with 3880 additions and 235 deletions

View File

@@ -90,6 +90,9 @@ Reference: `.github/workflows/release.yml`
- Action: Automatically updates the plugin code and metadata on OpenWebUI.com using `scripts/publish_plugin.py`. - Action: Automatically updates the plugin code and metadata on OpenWebUI.com using `scripts/publish_plugin.py`.
- **Auto-Sync**: If a local plugin has no ID but matches an existing published plugin by **Title**, the script will automatically fetch the ID, update the local file, and proceed with the update. - **Auto-Sync**: If a local plugin has no ID but matches an existing published plugin by **Title**, the script will automatically fetch the ID, update the local file, and proceed with the update.
- Requirement: `OPENWEBUI_API_KEY` secret must be set. - Requirement: `OPENWEBUI_API_KEY` secret must be set.
- **README Link**: When announcing a release, always include the GitHub README URL for the plugin:
- Format: `https://github.com/Fu-Jie/awesome-openwebui/blob/main/plugins/{type}/{name}/README.md`
- Example: `https://github.com/Fu-Jie/awesome-openwebui/blob/main/plugins/filters/folder-memory/README.md`
### Pull Request Check ### Pull Request Check
- Workflow: `.github/workflows/plugin-version-check.yml` - Workflow: `.github/workflows/plugin-version-check.yml`

View File

@@ -100,13 +100,14 @@ description: 插件功能的简短描述。Brief description of plugin functiona
| `author_url` | 作者主页链接 | `https://github.com/Fu-Jie/awesome-openwebui` | | `author_url` | 作者主页链接 | `https://github.com/Fu-Jie/awesome-openwebui` |
| `funding_url` | 赞助/项目链接 | `https://github.com/open-webui` | | `funding_url` | 赞助/项目链接 | `https://github.com/open-webui` |
| `version` | 语义化版本号 | `0.1.0`, `1.2.3` | | `version` | 语义化版本号 | `0.1.0`, `1.2.3` |
| `icon_url` | 图标 (Base64 编码的 SVG) | 见下方图标规范 | | `icon_url` | 图标 (Base64 编码的 SVG) | 仅 Action 插件**必须**提供。其他类型可选。 |
| `requirements` | 额外依赖 (仅 OpenWebUI 环境未安装的) | `python-docx==1.1.2` | | `requirements` | 额外依赖 (仅 OpenWebUI 环境未安装的) | `python-docx==1.1.2` |
| `description` | 功能描述 | `将对话导出为 Word 文档` | | `description` | 功能描述 | `将对话导出为 Word 文档` |
#### 图标规范 (Icon Guidelines) #### 图标规范 (Icon Guidelines)
- 图标来源:从 [Lucide Icons](https://lucide.dev/icons/) 获取符合插件功能的图标 - 图标来源:从 [Lucide Icons](https://lucide.dev/icons/) 获取符合插件功能的图标
- 适用范围Action 插件**必须**提供,其他插件可选
- 格式Base64 编码的 SVG - 格式Base64 编码的 SVG
- 获取方法:从 Lucide 下载 SVG然后使用 Base64 编码 - 获取方法:从 Lucide 下载 SVG然后使用 Base64 编码
- 示例格式: - 示例格式:
@@ -788,6 +789,19 @@ Filter 实例是**单例 (Singleton)**。
--- ---
## 🧪 测试规范 (Testing Standards)
### 1. Copilot SDK 测试模型 (Copilot SDK Test Models)
在编写 Copilot SDK 相关的测试脚本时 (如 `test_injection.py`, `test_capabilities.py` 等)**必须**优先使用以下免费/低成本模型之一,严禁使用高昂费用的模型进行常规测试,除非用户明确要求:
- `gpt-5-mini` (首选 / Preferred)
- `gpt-4.1`
此规则适用于所有自动化测试脚本和临时验证脚本。
---
## 🔄 工作流与流程 (Workflow & Process) ## 🔄 工作流与流程 (Workflow & Process)
### 1. ✅ 开发检查清单 (Development Checklist) ### 1. ✅ 开发检查清单 (Development Checklist)

View File

@@ -246,6 +246,52 @@ jobs:
echo "=== Collected Files ===" echo "=== Collected Files ==="
find release_plugins -name "*.py" -type f | head -20 find release_plugins -name "*.py" -type f | head -20
- name: Update plugin icon URLs
run: |
echo "Updating icon_url in plugins to use absolute GitHub URLs..."
# Base URL for raw content using the release tag
REPO_URL="https://raw.githubusercontent.com/${{ github.repository }}/${{ steps.version.outputs.version }}"
find release_plugins -name "*.py" | while read -r file; do
# $file is like release_plugins/plugins/actions/infographic/infographic.py
# Remove release_plugins/ prefix to get the path in the repo
src_file="${file#release_plugins/}"
src_dir=$(dirname "$src_file")
base_name=$(basename "$src_file" .py)
# Check if a corresponding png exists in the source repository
png_file="${src_dir}/${base_name}.png"
if [ -f "$png_file" ]; then
echo "Found icon for $src_file: $png_file"
TARGET_ICON_URL="${REPO_URL}/${png_file}"
# Use python for safe replacement
python3 -c "
import sys
import re
file_path = '$file'
icon_url = '$TARGET_ICON_URL'
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
# Replace icon_url: ... with new url
# Matches 'icon_url: ...' and replaces it
new_content = re.sub(r'^icon_url:.*$', f'icon_url: {icon_url}', content, flags=re.MULTILINE)
with open(file_path, 'w', encoding='utf-8') as f:
f.write(new_content)
print(f'Successfully updated icon_url in {file_path}')
except Exception as e:
print(f'Error updating {file_path}: {e}', file=sys.stderr)
sys.exit(1)
"
fi
done
- name: Debug Filenames - name: Debug Filenames
run: | run: |
python3 -c "import sys; print(f'Filesystem encoding: {sys.getfilesystemencoding()}')" python3 -c "import sys; print(f'Filesystem encoding: {sys.getfilesystemencoding()}')"

View File

@@ -10,28 +10,28 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
<!-- STATS_START --> <!-- STATS_START -->
## 📊 Community Stats ## 📊 Community Stats
> 🕐 Auto-updated: 2026-01-20 19:10 > 🕐 Auto-updated: 2026-01-27 02:13
| 👤 Author | 👥 Followers | ⭐ Points | 🏆 Contributions | | 👤 Author | 👥 Followers | ⭐ Points | 🏆 Contributions |
|:---:|:---:|:---:|:---:| |:---:|:---:|:---:|:---:|
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **137** | **134** | **25** | | [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **162** | **157** | **33** |
| 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves | | 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves |
|:---:|:---:|:---:|:---:|:---:| |:---:|:---:|:---:|:---:|:---:|
| **16** | **1887** | **22101** | **120** | **147** | | **19** | **2438** | **28054** | **141** | **188** |
### 🔥 Top 6 Popular Plugins ### 🔥 Top 6 Popular Plugins
> 🕐 Auto-updated: 2026-01-20 19:10 > 🕐 Auto-updated: 2026-01-27 02:13
| Rank | Plugin | Version | Downloads | Views | Updated | | Rank | Plugin | Version | Downloads | Views | Updated |
|:---:|------|:---:|:---:|:---:|:---:| |:---:|------|:---:|:---:|:---:|:---:|
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.1 | 550 | 4939 | 2026-01-17 | | 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.1 | 639 | 5682 | 2026-01-17 |
| 🥈 | [📊 Smart Infographic (AntV)](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.4.9 | 282 | 2667 | 2026-01-18 | | 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.4.9 | 415 | 3740 | 2026-01-25 |
| 🥉 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 215 | 844 | 2026-01-07 | | 🥉 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 262 | 1067 | 2026-01-07 |
| 4⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.1 | 189 | 2051 | 2026-01-20 | | 4⃣ | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.3 | 235 | 1872 | 2026-01-17 |
| 5⃣ | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.3 | 170 | 1457 | 2026-01-17 | | 5⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.2 | 232 | 2499 | 2026-01-21 |
| 6⃣ | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | 0.2.4 | 144 | 2395 | 2026-01-17 | | 6⃣ | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | 0.2.4 | 169 | 2708 | 2026-01-17 |
*See full stats in [Community Stats Report](./docs/community-stats.md)* *See full stats in [Community Stats Report](./docs/community-stats.md)*
<!-- STATS_END --> <!-- STATS_END -->
@@ -43,6 +43,7 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
Located in the `plugins/` directory, containing Python-based enhancements: Located in the `plugins/` directory, containing Python-based enhancements:
#### Actions #### Actions
- **Smart Mind Map** (`smart-mind-map`): Generates interactive mind maps from text. - **Smart Mind Map** (`smart-mind-map`): Generates interactive mind maps from text.
- **Smart Infographic** (`infographic`): Transforms text into professional infographics using AntV. - **Smart Infographic** (`infographic`): Transforms text into professional infographics using AntV.
- **Flash Card** (`flash-card`): Quickly generates beautiful flashcards for learning. - **Flash Card** (`flash-card`): Quickly generates beautiful flashcards for learning.
@@ -51,12 +52,18 @@ Located in the `plugins/` directory, containing Python-based enhancements:
- **Export to Word** (`export_to_docx`): Exports chat history to Word documents. - **Export to Word** (`export_to_docx`): Exports chat history to Word documents.
#### Filters #### Filters
- **Async Context Compression** (`async-context-compression`): Optimizes token usage via context compression. - **Async Context Compression** (`async-context-compression`): Optimizes token usage via context compression.
- **Context Enhancement** (`context_enhancement_filter`): Enhances chat context. - **Context Enhancement** (`context_enhancement_filter`): Enhances chat context.
- **Folder Memory** (`folder-memory`): Automatically extracts project rules from conversations and injects them into the folder's system prompt. - **Folder Memory** (`folder-memory`): Automatically extracts project rules from conversations and injects them into the folder's system prompt.
- **Markdown Normalizer** (`markdown_normalizer`): Fixes common Markdown formatting issues in LLM outputs. - **Markdown Normalizer** (`markdown_normalizer`): Fixes common Markdown formatting issues in LLM outputs.
#### Pipes
- **GitHub Copilot SDK** (`github-copilot-sdk`): Official GitHub Copilot SDK integration. Supports dynamic models, multi-turn conversation, streaming, multimodal input, and infinite sessions.
#### Pipelines #### Pipelines
- **MoE Prompt Refiner** (`moe_prompt_refiner`): Refines prompts for Mixture of Experts (MoE) summary requests to generate high-quality comprehensive reports. - **MoE Prompt Refiner** (`moe_prompt_refiner`): Refines prompts for Mixture of Experts (MoE) summary requests to generate high-quality comprehensive reports.
### 🎯 Prompts ### 🎯 Prompts
@@ -101,6 +108,7 @@ This project is a collection of resources and does not require a Python environm
### Contributing ### Contributing
If you have great prompts or plugins to share: If you have great prompts or plugins to share:
1. Fork this repository. 1. Fork this repository.
2. Add your files to the appropriate `prompts/` or `plugins/` directory. 2. Add your files to the appropriate `prompts/` or `plugins/` directory.
3. Submit a Pull Request. 3. Submit a Pull Request.

View File

@@ -7,28 +7,28 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
<!-- STATS_START --> <!-- STATS_START -->
## 📊 社区统计 ## 📊 社区统计
> 🕐 自动更新于 2026-01-20 19:10 > 🕐 自动更新于 2026-01-27 02:13
| 👤 作者 | 👥 粉丝 | ⭐ 积分 | 🏆 贡献 | | 👤 作者 | 👥 粉丝 | ⭐ 积分 | 🏆 贡献 |
|:---:|:---:|:---:|:---:| |:---:|:---:|:---:|:---:|
| [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **137** | **134** | **25** | | [Fu-Jie](https://openwebui.com/u/Fu-Jie) | **162** | **157** | **33** |
| 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 | | 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 |
|:---:|:---:|:---:|:---:|:---:| |:---:|:---:|:---:|:---:|:---:|
| **16** | **1887** | **22101** | **120** | **147** | | **19** | **2438** | **28054** | **141** | **188** |
### 🔥 热门插件 Top 6 ### 🔥 热门插件 Top 6
> 🕐 自动更新于 2026-01-20 19:10 > 🕐 自动更新于 2026-01-27 02:13
| 排名 | 插件 | 版本 | 下载 | 浏览 | 更新日期 | | 排名 | 插件 | 版本 | 下载 | 浏览 | 更新日期 |
|:---:|------|:---:|:---:|:---:|:---:| |:---:|------|:---:|:---:|:---:|:---:|
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.1 | 550 | 4939 | 2026-01-17 | | 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | 0.9.1 | 639 | 5682 | 2026-01-17 |
| 🥈 | [📊 Smart Infographic (AntV)](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.4.9 | 282 | 2667 | 2026-01-18 | | 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 1.4.9 | 415 | 3740 | 2026-01-25 |
| 🥉 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 215 | 844 | 2026-01-07 | | 🥉 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | 0.3.7 | 262 | 1067 | 2026-01-07 |
| 4⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.1 | 189 | 2051 | 2026-01-20 | | 4⃣ | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.3 | 235 | 1872 | 2026-01-17 |
| 5⃣ | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | 0.4.3 | 170 | 1457 | 2026-01-17 | | 5⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | 1.2.2 | 232 | 2499 | 2026-01-21 |
| 6⃣ | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | 0.2.4 | 144 | 2395 | 2026-01-17 | | 6⃣ | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | 0.2.4 | 169 | 2708 | 2026-01-17 |
*完整统计请查看 [社区统计报告](./docs/community-stats.zh.md)* *完整统计请查看 [社区统计报告](./docs/community-stats.zh.md)*
<!-- STATS_END --> <!-- STATS_END -->
@@ -40,6 +40,7 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
位于 `plugins/` 目录,包含各类 Python 编写的功能增强插件: 位于 `plugins/` 目录,包含各类 Python 编写的功能增强插件:
#### Actions (交互增强) #### Actions (交互增强)
- **Smart Mind Map** (`smart-mind-map`): 智能分析文本并生成交互式思维导图。 - **Smart Mind Map** (`smart-mind-map`): 智能分析文本并生成交互式思维导图。
- **Smart Infographic** (`infographic`): 基于 AntV 的智能信息图生成工具。 - **Smart Infographic** (`infographic`): 基于 AntV 的智能信息图生成工具。
- **Flash Card** (`flash-card`): 快速生成精美的学习记忆卡片。 - **Flash Card** (`flash-card`): 快速生成精美的学习记忆卡片。
@@ -48,6 +49,7 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
- **Export to Word** (`export_to_docx`): 将对话内容导出为 Word 文档。 - **Export to Word** (`export_to_docx`): 将对话内容导出为 Word 文档。
#### Filters (消息处理) #### Filters (消息处理)
- **Async Context Compression** (`async-context-compression`): 异步上下文压缩,优化 Token 使用。 - **Async Context Compression** (`async-context-compression`): 异步上下文压缩,优化 Token 使用。
- **Context Enhancement** (`context_enhancement_filter`): 上下文增强过滤器。 - **Context Enhancement** (`context_enhancement_filter`): 上下文增强过滤器。
- **Folder Memory** (`folder-memory`): 自动从对话中提取项目规则并注入到文件夹系统提示词中。 - **Folder Memory** (`folder-memory`): 自动从对话中提取项目规则并注入到文件夹系统提示词中。
@@ -57,9 +59,12 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
- **Multi-Model Context Merger** (`multi_model_context_merger`): 自动合并并注入多模型回答的上下文。 - **Multi-Model Context Merger** (`multi_model_context_merger`): 自动合并并注入多模型回答的上下文。
#### Pipes (模型管道) #### Pipes (模型管道)
- **GitHub Copilot SDK** (`github-copilot-sdk`): GitHub Copilot SDK 官方集成。支持动态模型、多轮对话、流式输出、图片输入及无限会话。
- **Gemini Manifold** (`gemini_mainfold`): 集成 Gemini 模型的管道。 - **Gemini Manifold** (`gemini_mainfold`): 集成 Gemini 模型的管道。
#### Pipelines (工作流管道) #### Pipelines (工作流管道)
- **MoE Prompt Refiner** (`moe_prompt_refiner`): 优化多模型 (MoE) 汇总请求的提示词,生成高质量的综合报告。 - **MoE Prompt Refiner** (`moe_prompt_refiner`): 优化多模型 (MoE) 汇总请求的提示词,生成高质量的综合报告。
### 🎯 提示词 (Prompts) ### 🎯 提示词 (Prompts)
@@ -107,6 +112,7 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
### 贡献代码 ### 贡献代码
如果你有优质的提示词或插件想要分享: 如果你有优质的提示词或插件想要分享:
1. Fork 本仓库。 1. Fork 本仓库。
2. 将你的文件添加到对应的 `prompts/``plugins/` 目录。 2. 将你的文件添加到对应的 `prompts/``plugins/` 目录。
3. 提交 Pull Request。 3. 提交 Pull Request。

View File

@@ -1,7 +1,7 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"label": "downloads", "label": "downloads",
"message": "1.9k", "message": "2.4k",
"color": "blue", "color": "blue",
"namedLogo": "openwebui" "namedLogo": "openwebui"
} }

View File

@@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"label": "followers", "label": "followers",
"message": "137", "message": "162",
"color": "blue" "color": "blue"
} }

View File

@@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"label": "plugins", "label": "plugins",
"message": "16", "message": "19",
"color": "green" "color": "green"
} }

View File

@@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"label": "points", "label": "points",
"message": "134", "message": "157",
"color": "orange" "color": "orange"
} }

View File

@@ -1,6 +1,6 @@
{ {
"schemaVersion": 1, "schemaVersion": 1,
"label": "upvotes", "label": "upvotes",
"message": "120", "message": "141",
"color": "brightgreen" "color": "brightgreen"
} }

View File

@@ -1,14 +1,16 @@
{ {
"total_posts": 16, "total_posts": 19,
"total_downloads": 1887, "total_downloads": 2438,
"total_views": 22101, "total_views": 28054,
"total_upvotes": 120, "total_upvotes": 141,
"total_downvotes": 2, "total_downvotes": 2,
"total_saves": 147, "total_saves": 188,
"total_comments": 24, "total_comments": 37,
"by_type": { "by_type": {
"pipe": 1,
"action": 14, "action": 14,
"unknown": 2 "unknown": 3,
"filter": 1
}, },
"posts": [ "posts": [
{ {
@@ -18,29 +20,29 @@
"version": "0.9.1", "version": "0.9.1",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "Intelligently analyzes text content and generates interactive mind maps to help users structure and visualize knowledge.", "description": "Intelligently analyzes text content and generates interactive mind maps to help users structure and visualize knowledge.",
"downloads": 550, "downloads": 639,
"views": 4939, "views": 5682,
"upvotes": 15, "upvotes": 17,
"saves": 30, "saves": 38,
"comments": 11, "comments": 11,
"created_at": "2025-12-30", "created_at": "2025-12-30",
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
"url": "https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a" "url": "https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a"
}, },
{ {
"title": "📊 Smart Infographic (AntV)", "title": "Smart Infographic",
"slug": "smart_infographic_ad6f0c7f", "slug": "smart_infographic_ad6f0c7f",
"type": "action", "type": "action",
"version": "1.4.9", "version": "1.4.9",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "AI-powered infographic generator based on AntV Infographic. Supports professional templates, auto-icon matching, and SVG/PNG downloads.", "description": "AI-powered infographic generator based on AntV Infographic. Supports professional templates, auto-icon matching, and SVG/PNG downloads.",
"downloads": 282, "downloads": 415,
"views": 2667, "views": 3740,
"upvotes": 14, "upvotes": 18,
"saves": 21, "saves": 27,
"comments": 3, "comments": 10,
"created_at": "2025-12-28", "created_at": "2025-12-28",
"updated_at": "2026-01-18", "updated_at": "2026-01-25",
"url": "https://openwebui.com/posts/smart_infographic_ad6f0c7f" "url": "https://openwebui.com/posts/smart_infographic_ad6f0c7f"
}, },
{ {
@@ -50,8 +52,8 @@
"version": "0.3.7", "version": "0.3.7",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "Extracts tables from chat messages and exports them to Excel (.xlsx) files with smart formatting.", "description": "Extracts tables from chat messages and exports them to Excel (.xlsx) files with smart formatting.",
"downloads": 215, "downloads": 262,
"views": 844, "views": 1067,
"upvotes": 4, "upvotes": 4,
"saves": 6, "saves": 6,
"comments": 0, "comments": 0,
@@ -59,22 +61,6 @@
"updated_at": "2026-01-07", "updated_at": "2026-01-07",
"url": "https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d" "url": "https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d"
}, },
{
"title": "Async Context Compression",
"slug": "async_context_compression_b1655bc8",
"type": "action",
"version": "1.2.1",
"author": "Fu-Jie",
"description": "Reduces token consumption in long conversations while maintaining coherence through intelligent summarization and message compression.",
"downloads": 189,
"views": 2051,
"upvotes": 9,
"saves": 22,
"comments": 0,
"created_at": "2025-11-08",
"updated_at": "2026-01-20",
"url": "https://openwebui.com/posts/async_context_compression_b1655bc8"
},
{ {
"title": "Export to Word (Enhanced)", "title": "Export to Word (Enhanced)",
"slug": "export_to_word_enhanced_formatting_fca6a315", "slug": "export_to_word_enhanced_formatting_fca6a315",
@@ -82,15 +68,31 @@
"version": "0.4.3", "version": "0.4.3",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "Export current conversation from Markdown to Word (.docx) with Mermaid diagrams rendered client-side (Mermaid.js, SVG+PNG), LaTeX math, real hyperlinks, improved tables, syntax highlighting, and blockquote support.", "description": "Export current conversation from Markdown to Word (.docx) with Mermaid diagrams rendered client-side (Mermaid.js, SVG+PNG), LaTeX math, real hyperlinks, improved tables, syntax highlighting, and blockquote support.",
"downloads": 170, "downloads": 235,
"views": 1457, "views": 1872,
"upvotes": 8, "upvotes": 8,
"saves": 17, "saves": 21,
"comments": 0, "comments": 0,
"created_at": "2026-01-03", "created_at": "2026-01-03",
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
"url": "https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315" "url": "https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315"
}, },
{
"title": "Async Context Compression",
"slug": "async_context_compression_b1655bc8",
"type": "action",
"version": "1.2.2",
"author": "Fu-Jie",
"description": "Reduces token consumption in long conversations while maintaining coherence through intelligent summarization and message compression.",
"downloads": 232,
"views": 2499,
"upvotes": 9,
"saves": 27,
"comments": 0,
"created_at": "2025-11-08",
"updated_at": "2026-01-21",
"url": "https://openwebui.com/posts/async_context_compression_b1655bc8"
},
{ {
"title": "Flash Card", "title": "Flash Card",
"slug": "flash_card_65a2ea8f", "slug": "flash_card_65a2ea8f",
@@ -98,10 +100,10 @@
"version": "0.2.4", "version": "0.2.4",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "Quickly generates beautiful flashcards from text, extracting key points and categories.", "description": "Quickly generates beautiful flashcards from text, extracting key points and categories.",
"downloads": 144, "downloads": 169,
"views": 2395, "views": 2708,
"upvotes": 10, "upvotes": 11,
"saves": 12, "saves": 13,
"comments": 2, "comments": 2,
"created_at": "2025-12-30", "created_at": "2025-12-30",
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
@@ -114,10 +116,10 @@
"version": "1.2.4", "version": "1.2.4",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "A content normalizer filter that fixes common Markdown formatting issues in LLM outputs, such as broken code blocks, LaTeX formulas, and list formatting.", "description": "A content normalizer filter that fixes common Markdown formatting issues in LLM outputs, such as broken code blocks, LaTeX formulas, and list formatting.",
"downloads": 96, "downloads": 153,
"views": 2234, "views": 2810,
"upvotes": 10, "upvotes": 10,
"saves": 17, "saves": 20,
"comments": 5, "comments": 5,
"created_at": "2026-01-12", "created_at": "2026-01-12",
"updated_at": "2026-01-19", "updated_at": "2026-01-19",
@@ -130,10 +132,10 @@
"version": "1.0.0", "version": "1.0.0",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "A comprehensive thinking lens that dives deep into any content - from context to logic, insights, and action paths.", "description": "A comprehensive thinking lens that dives deep into any content - from context to logic, insights, and action paths.",
"downloads": 73, "downloads": 93,
"views": 707, "views": 850,
"upvotes": 4, "upvotes": 4,
"saves": 7, "saves": 8,
"comments": 0, "comments": 0,
"created_at": "2026-01-08", "created_at": "2026-01-08",
"updated_at": "2026-01-08", "updated_at": "2026-01-08",
@@ -146,11 +148,11 @@
"version": "0.4.3", "version": "0.4.3",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "将对话导出为 Word (.docx),支持 Mermaid 图表 (客户端渲染 SVG+PNG)、LaTeX 数学公式、真实超链接、增强表格格式、代码高亮和引用块。", "description": "将对话导出为 Word (.docx),支持 Mermaid 图表 (客户端渲染 SVG+PNG)、LaTeX 数学公式、真实超链接、增强表格格式、代码高亮和引用块。",
"downloads": 65, "downloads": 87,
"views": 1335, "views": 1635,
"upvotes": 11, "upvotes": 11,
"saves": 3, "saves": 4,
"comments": 1, "comments": 4,
"created_at": "2026-01-04", "created_at": "2026-01-04",
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
"url": "https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0" "url": "https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0"
@@ -162,8 +164,8 @@
"version": "1.4.9", "version": "1.4.9",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "基于 AntV Infographic 的智能信息图生成插件。支持多种专业模板,自动图标匹配,并提供 SVG/PNG 下载功能。", "description": "基于 AntV Infographic 的智能信息图生成插件。支持多种专业模板,自动图标匹配,并提供 SVG/PNG 下载功能。",
"downloads": 43, "downloads": 47,
"views": 704, "views": 792,
"upvotes": 6, "upvotes": 6,
"saves": 0, "saves": 0,
"comments": 0, "comments": 0,
@@ -171,6 +173,22 @@
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
"url": "https://openwebui.com/posts/智能信息图_e04a48ff" "url": "https://openwebui.com/posts/智能信息图_e04a48ff"
}, },
{
"title": "📂 Folder Memory Auto-Evolving Project Context",
"slug": "folder_memory_auto_evolving_project_context_4a9875b2",
"type": "filter",
"version": "0.1.0",
"author": "Fu-Jie",
"description": "Automatically extracts project rules from conversations and injects them into the folder's system prompt.",
"downloads": 27,
"views": 760,
"upvotes": 4,
"saves": 5,
"comments": 0,
"created_at": "2026-01-20",
"updated_at": "2026-01-20",
"url": "https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2"
},
{ {
"title": "思维导图", "title": "思维导图",
"slug": "智能生成交互式思维导图帮助用户可视化知识_8d4b097b", "slug": "智能生成交互式思维导图帮助用户可视化知识_8d4b097b",
@@ -178,15 +196,31 @@
"version": "0.9.1", "version": "0.9.1",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "智能分析文本内容,生成交互式思维导图,帮助用户结构化和可视化知识。", "description": "智能分析文本内容,生成交互式思维导图,帮助用户结构化和可视化知识。",
"downloads": 24, "downloads": 27,
"views": 407, "views": 457,
"upvotes": 3, "upvotes": 4,
"saves": 1, "saves": 1,
"comments": 0, "comments": 0,
"created_at": "2025-12-31", "created_at": "2025-12-31",
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
"url": "https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b" "url": "https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b"
}, },
{
"title": "异步上下文压缩",
"slug": "异步上下文压缩_5c0617cb",
"type": "action",
"version": "1.2.2",
"author": "Fu-Jie",
"description": "通过智能摘要和消息压缩,降低长对话的 token 消耗,同时保持对话连贯性。",
"downloads": 22,
"views": 502,
"upvotes": 5,
"saves": 2,
"comments": 0,
"created_at": "2025-11-08",
"updated_at": "2026-01-21",
"url": "https://openwebui.com/posts/异步上下文压缩_5c0617cb"
},
{ {
"title": "闪记卡 (Flash Card)", "title": "闪记卡 (Flash Card)",
"slug": "闪记卡生成插件_4a31eac3", "slug": "闪记卡生成插件_4a31eac3",
@@ -194,31 +228,15 @@
"version": "0.2.4", "version": "0.2.4",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "快速将文本提炼为精美的学习记忆卡片,支持核心要点提取与分类。", "description": "快速将文本提炼为精美的学习记忆卡片,支持核心要点提取与分类。",
"downloads": 16, "downloads": 19,
"views": 453, "views": 514,
"upvotes": 5, "upvotes": 6,
"saves": 1, "saves": 1,
"comments": 0, "comments": 0,
"created_at": "2025-12-30", "created_at": "2025-12-30",
"updated_at": "2026-01-17", "updated_at": "2026-01-17",
"url": "https://openwebui.com/posts/闪记卡生成插件_4a31eac3" "url": "https://openwebui.com/posts/闪记卡生成插件_4a31eac3"
}, },
{
"title": "异步上下文压缩",
"slug": "异步上下文压缩_5c0617cb",
"type": "action",
"version": "1.2.1",
"author": "Fu-Jie",
"description": "通过智能摘要和消息压缩,降低长对话的 token 消耗,同时保持对话连贯性。",
"downloads": 14,
"views": 377,
"upvotes": 5,
"saves": 1,
"comments": 0,
"created_at": "2025-11-08",
"updated_at": "2026-01-20",
"url": "https://openwebui.com/posts/异步上下文压缩_5c0617cb"
},
{ {
"title": "精读", "title": "精读",
"slug": "精读_99830b0f", "slug": "精读_99830b0f",
@@ -226,8 +244,8 @@
"version": "1.0.0", "version": "1.0.0",
"author": "Fu-Jie", "author": "Fu-Jie",
"description": "全方位的思维透镜 —— 从背景全景到逻辑脉络,从深度洞察到行动路径。", "description": "全方位的思维透镜 —— 从背景全景到逻辑脉络,从深度洞察到行动路径。",
"downloads": 6, "downloads": 9,
"views": 261, "views": 311,
"upvotes": 3, "upvotes": 3,
"saves": 1, "saves": 1,
"comments": 0, "comments": 0,
@@ -235,6 +253,38 @@
"updated_at": "2026-01-08", "updated_at": "2026-01-08",
"url": "https://openwebui.com/posts/精读_99830b0f" "url": "https://openwebui.com/posts/精读_99830b0f"
}, },
{
"title": "GitHub Copilot Official SDK Pipe",
"slug": "github_copilot_official_sdk_pipe_ce96f7b4",
"type": "pipe",
"version": "0.1.1",
"author": "Fu-Jie",
"description": "Integrate GitHub Copilot SDK. Supports dynamic models, multi-turn conversation, streaming, multimodal input, and infinite sessions (context compaction).",
"downloads": 2,
"views": 81,
"upvotes": 2,
"saves": 0,
"comments": 0,
"created_at": "2026-01-26",
"updated_at": "2026-01-26",
"url": "https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4"
},
{
"title": "🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager",
"slug": "open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e",
"type": "unknown",
"version": "",
"author": "",
"description": "",
"downloads": 0,
"views": 401,
"upvotes": 6,
"saves": 6,
"comments": 3,
"created_at": "2026-01-25",
"updated_at": "2026-01-25",
"url": "https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e"
},
{ {
"title": "Review of Claude Haiku 4.5", "title": "Review of Claude Haiku 4.5",
"slug": "review_of_claude_haiku_45_41b0db39", "slug": "review_of_claude_haiku_45_41b0db39",
@@ -243,7 +293,7 @@
"author": "", "author": "",
"description": "", "description": "",
"downloads": 0, "downloads": 0,
"views": 62, "views": 95,
"upvotes": 1, "upvotes": 1,
"saves": 0, "saves": 0,
"comments": 0, "comments": 0,
@@ -259,7 +309,7 @@
"author": "", "author": "",
"description": "", "description": "",
"downloads": 0, "downloads": 0,
"views": 1208, "views": 1278,
"upvotes": 12, "upvotes": 12,
"saves": 8, "saves": 8,
"comments": 2, "comments": 2,
@@ -273,11 +323,11 @@
"name": "Fu-Jie", "name": "Fu-Jie",
"profile_url": "https://openwebui.com/u/Fu-Jie", "profile_url": "https://openwebui.com/u/Fu-Jie",
"profile_image": "https://community.s3.openwebui.com/uploads/users/b15d1348-4347-42b4-b815-e053342d6cb0/profile_d9510745-4bd4-4f8f-a997-4a21847d9300.webp", "profile_image": "https://community.s3.openwebui.com/uploads/users/b15d1348-4347-42b4-b815-e053342d6cb0/profile_d9510745-4bd4-4f8f-a997-4a21847d9300.webp",
"followers": 137, "followers": 162,
"following": 2, "following": 3,
"total_points": 134, "total_points": 157,
"post_points": 118, "post_points": 139,
"comment_points": 16, "comment_points": 18,
"contributions": 25 "contributions": 33
} }
} }

View File

@@ -1,40 +1,45 @@
# 📊 OpenWebUI Community Stats Report # 📊 OpenWebUI Community Stats Report
> 📅 Updated: 2026-01-20 19:10 > 📅 Updated: 2026-01-27 02:13
## 📈 Overview ## 📈 Overview
| Metric | Value | | Metric | Value |
|------|------| |------|------|
| 📝 Total Posts | 16 | | 📝 Total Posts | 19 |
| ⬇️ Total Downloads | 1887 | | ⬇️ Total Downloads | 2438 |
| 👁️ Total Views | 22101 | | 👁️ Total Views | 28054 |
| 👍 Total Upvotes | 120 | | 👍 Total Upvotes | 141 |
| 💾 Total Saves | 147 | | 💾 Total Saves | 188 |
| 💬 Total Comments | 24 | | 💬 Total Comments | 37 |
## 📂 By Type ## 📂 By Type
- **pipe**: 1
- **action**: 14 - **action**: 14
- **unknown**: 2 - **unknown**: 3
- **filter**: 1
## 📋 Posts List ## 📋 Posts List
| Rank | Title | Type | Version | Downloads | Views | Upvotes | Saves | Updated | | Rank | Title | Type | Version | Downloads | Views | Upvotes | Saves | Updated |
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:| |:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.1 | 550 | 4939 | 15 | 30 | 2026-01-17 | | 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.1 | 639 | 5682 | 17 | 38 | 2026-01-17 |
| 2 | [📊 Smart Infographic (AntV)](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.4.9 | 282 | 2667 | 14 | 21 | 2026-01-18 | | 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.4.9 | 415 | 3740 | 18 | 27 | 2026-01-25 |
| 3 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 215 | 844 | 4 | 6 | 2026-01-07 | | 3 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 262 | 1067 | 4 | 6 | 2026-01-07 |
| 4 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.1 | 189 | 2051 | 9 | 22 | 2026-01-20 | | 4 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.3 | 235 | 1872 | 8 | 21 | 2026-01-17 |
| 5 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.3 | 170 | 1457 | 8 | 17 | 2026-01-17 | | 5 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.2 | 232 | 2499 | 9 | 27 | 2026-01-21 |
| 6 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 144 | 2395 | 10 | 12 | 2026-01-17 | | 6 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 169 | 2708 | 11 | 13 | 2026-01-17 |
| 7 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 96 | 2234 | 10 | 17 | 2026-01-19 | | 7 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 153 | 2810 | 10 | 20 | 2026-01-19 |
| 8 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 73 | 707 | 4 | 7 | 2026-01-08 | | 8 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 93 | 850 | 4 | 8 | 2026-01-08 |
| 9 | [导出为 Word (增强版)](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.3 | 65 | 1335 | 11 | 3 | 2026-01-17 | | 9 | [导出为 Word (增强版)](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.3 | 87 | 1635 | 11 | 4 | 2026-01-17 |
| 10 | [📊 智能信息图 (AntV Infographic)](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.4.9 | 43 | 704 | 6 | 0 | 2026-01-17 | | 10 | [📊 智能信息图 (AntV Infographic)](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.4.9 | 47 | 792 | 6 | 0 | 2026-01-17 |
| 11 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.1 | 24 | 407 | 3 | 1 | 2026-01-17 | | 11 | [📂 Folder Memory Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter | 0.1.0 | 27 | 760 | 4 | 5 | 2026-01-20 |
| 12 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 16 | 453 | 5 | 1 | 2026-01-17 | | 12 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.1 | 27 | 457 | 4 | 1 | 2026-01-17 |
| 13 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.1 | 14 | 377 | 5 | 1 | 2026-01-20 | | 13 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.2 | 22 | 502 | 5 | 2 | 2026-01-21 |
| 14 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 6 | 261 | 3 | 1 | 2026-01-08 | | 14 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 19 | 514 | 6 | 1 | 2026-01-17 |
| 15 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 62 | 1 | 0 | 2026-01-14 | | 15 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 9 | 311 | 3 | 1 | 2026-01-08 |
| 16 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1208 | 12 | 8 | 2026-01-10 | | 16 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe | 0.1.1 | 2 | 81 | 2 | 0 | 2026-01-26 |
| 17 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | unknown | | 0 | 401 | 6 | 6 | 2026-01-25 |
| 18 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 95 | 1 | 0 | 2026-01-14 |
| 19 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1278 | 12 | 8 | 2026-01-10 |

View File

@@ -1,40 +1,45 @@
# 📊 OpenWebUI 社区统计报告 # 📊 OpenWebUI 社区统计报告
> 📅 更新时间: 2026-01-20 19:10 > 📅 更新时间: 2026-01-27 02:13
## 📈 总览 ## 📈 总览
| 指标 | 数值 | | 指标 | 数值 |
|------|------| |------|------|
| 📝 发布数量 | 16 | | 📝 发布数量 | 19 |
| ⬇️ 总下载量 | 1887 | | ⬇️ 总下载量 | 2438 |
| 👁️ 总浏览量 | 22101 | | 👁️ 总浏览量 | 28054 |
| 👍 总点赞数 | 120 | | 👍 总点赞数 | 141 |
| 💾 总收藏数 | 147 | | 💾 总收藏数 | 188 |
| 💬 总评论数 | 24 | | 💬 总评论数 | 37 |
## 📂 按类型分类 ## 📂 按类型分类
- **pipe**: 1
- **action**: 14 - **action**: 14
- **unknown**: 2 - **unknown**: 3
- **filter**: 1
## 📋 发布列表 ## 📋 发布列表
| 排名 | 标题 | 类型 | 版本 | 下载 | 浏览 | 点赞 | 收藏 | 更新日期 | | 排名 | 标题 | 类型 | 版本 | 下载 | 浏览 | 点赞 | 收藏 | 更新日期 |
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:| |:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.1 | 550 | 4939 | 15 | 30 | 2026-01-17 | | 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.1 | 639 | 5682 | 17 | 38 | 2026-01-17 |
| 2 | [📊 Smart Infographic (AntV)](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.4.9 | 282 | 2667 | 14 | 21 | 2026-01-18 | | 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action | 1.4.9 | 415 | 3740 | 18 | 27 | 2026-01-25 |
| 3 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 215 | 844 | 4 | 6 | 2026-01-07 | | 3 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.7 | 262 | 1067 | 4 | 6 | 2026-01-07 |
| 4 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.1 | 189 | 2051 | 9 | 22 | 2026-01-20 | | 4 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.3 | 235 | 1872 | 8 | 21 | 2026-01-17 |
| 5 | [Export to Word (Enhanced)](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action | 0.4.3 | 170 | 1457 | 8 | 17 | 2026-01-17 | | 5 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | action | 1.2.2 | 232 | 2499 | 9 | 27 | 2026-01-21 |
| 6 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 144 | 2395 | 10 | 12 | 2026-01-17 | | 6 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action | 0.2.4 | 169 | 2708 | 11 | 13 | 2026-01-17 |
| 7 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 96 | 2234 | 10 | 17 | 2026-01-19 | | 7 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | action | 1.2.4 | 153 | 2810 | 10 | 20 | 2026-01-19 |
| 8 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 73 | 707 | 4 | 7 | 2026-01-08 | | 8 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action | 1.0.0 | 93 | 850 | 4 | 8 | 2026-01-08 |
| 9 | [导出为 Word (增强版)](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.3 | 65 | 1335 | 11 | 3 | 2026-01-17 | | 9 | [导出为 Word (增强版)](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action | 0.4.3 | 87 | 1635 | 11 | 4 | 2026-01-17 |
| 10 | [📊 智能信息图 (AntV Infographic)](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.4.9 | 43 | 704 | 6 | 0 | 2026-01-17 | | 10 | [📊 智能信息图 (AntV Infographic)](https://openwebui.com/posts/智能信息图_e04a48ff) | action | 1.4.9 | 47 | 792 | 6 | 0 | 2026-01-17 |
| 11 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.1 | 24 | 407 | 3 | 1 | 2026-01-17 | | 11 | [📂 Folder Memory Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter | 0.1.0 | 27 | 760 | 4 | 5 | 2026-01-20 |
| 12 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 16 | 453 | 5 | 1 | 2026-01-17 | | 12 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action | 0.9.1 | 27 | 457 | 4 | 1 | 2026-01-17 |
| 13 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.1 | 14 | 377 | 5 | 1 | 2026-01-20 | | 13 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action | 1.2.2 | 22 | 502 | 5 | 2 | 2026-01-21 |
| 14 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 6 | 261 | 3 | 1 | 2026-01-08 | | 14 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action | 0.2.4 | 19 | 514 | 6 | 1 | 2026-01-17 |
| 15 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 62 | 1 | 0 | 2026-01-14 | | 15 | [精读](https://openwebui.com/posts/精读_99830b0f) | action | 1.0.0 | 9 | 311 | 3 | 1 | 2026-01-08 |
| 16 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1208 | 12 | 8 | 2026-01-10 | | 16 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe | 0.1.1 | 2 | 81 | 2 | 0 | 2026-01-26 |
| 17 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | unknown | | 0 | 401 | 6 | 6 | 2026-01-25 |
| 18 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | unknown | | 0 | 95 | 1 | 0 | 2026-01-14 |
| 19 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | unknown | | 0 | 1278 | 12 | 8 | 2026-01-10 |

View File

@@ -1,7 +1,7 @@
# Async Context Compression # Async Context Compression
<span class="category-badge filter">Filter</span> <span class="category-badge filter">Filter</span>
<span class="version-badge">v1.2.1</span> <span class="version-badge">v1.2.2</span>
Reduces token consumption in long conversations through intelligent summarization while maintaining conversational coherence. Reduces token consumption in long conversations through intelligent summarization while maintaining conversational coherence.

View File

@@ -1,7 +1,7 @@
# Async Context Compression异步上下文压缩 # Async Context Compression异步上下文压缩
<span class="category-badge filter">Filter</span> <span class="category-badge filter">Filter</span>
<span class="version-badge">v1.2.1</span> <span class="version-badge">v1.2.2</span>
通过智能摘要减少长对话的 token 消耗,同时保持对话连贯。 通过智能摘要减少长对话的 token 消耗,同时保持对话连贯。

View File

@@ -1,4 +1,15 @@
# Folder Memory # Folder Memory
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.1.0 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
---
### 📌 What's new in 0.1.0
- **Initial Release**: Automated "Project Rules" management for OpenWebUI folders.
- **Folder-Level Persistence**: Automatically updates folder system prompts with extracted rules.
- **Optimized Performance**: Runs asynchronously and supports `PRIORITY` configuration for seamless integration with other filters.
---
**Folder Memory** is an intelligent context filter plugin for OpenWebUI. It automatically extracts consistent "Project Rules" from ongoing conversations within a folder and injects them back into the folder's system prompt. **Folder Memory** is an intelligent context filter plugin for OpenWebUI. It automatically extracts consistent "Project Rules" from ongoing conversations within a folder and injects them back into the folder's system prompt.
@@ -11,6 +22,10 @@ This ensures that all future conversations within that folder share the same evo
- **Async Processing**: Runs in the background without blocking the user's chat experience. - **Async Processing**: Runs in the background without blocking the user's chat experience.
- **ORM Integration**: Directly updates folder data using OpenWebUI's internal models for reliability. - **ORM Integration**: Directly updates folder data using OpenWebUI's internal models for reliability.
## Prerequisites
- **Conversations must occur inside a folder.** This plugin only triggers when a chat belongs to a folder (i.e., you need to create a folder in OpenWebUI and start a conversation within it).
## Installation ## Installation
1. Copy `folder_memory.py` to your OpenWebUI `plugins/filters/` directory (or upload via Admin UI). 1. Copy `folder_memory.py` to your OpenWebUI `plugins/filters/` directory (or upload via Admin UI).

View File

@@ -1,4 +1,15 @@
# 文件夹记忆 (Folder Memory) # 文件夹记忆 (Folder Memory)
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.1.0 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
---
### 📌 0.1.0 版本特性
- **首个版本发布**:专注于自动化的“项目规则”管理。
- **文件夹级持久化**:自动将提取的规则回写到文件夹系统提示词中。
- **性能优化**:采用异步处理机制,并支持 `PRIORITY` 配置,确保与其他过滤器(如上下文压缩)完美协作。
---
**文件夹记忆 (Folder Memory)** 是一个 OpenWebUI 的智能上下文过滤器插件。它能自动从文件夹内的对话中提取一致性的“项目规则”,并将其回写到文件夹的系统提示词中。 **文件夹记忆 (Folder Memory)** 是一个 OpenWebUI 的智能上下文过滤器插件。它能自动从文件夹内的对话中提取一致性的“项目规则”,并将其回写到文件夹的系统提示词中。
@@ -11,6 +22,10 @@
- **异步处理**:在后台运行,不阻塞用户的聊天体验。 - **异步处理**:在后台运行,不阻塞用户的聊天体验。
- **ORM 集成**:直接使用 OpenWebUI 的内部模型更新文件夹数据,确保可靠性。 - **ORM 集成**:直接使用 OpenWebUI 的内部模型更新文件夹数据,确保可靠性。
## 前置条件
- **对话必须在文件夹内进行。** 此插件仅在聊天属于某个文件夹时触发(即您需要先在 OpenWebUI 中创建一个文件夹,并在其内部开始对话)。
## 安装指南 ## 安装指南
1.`folder_memory.py` (或中文版 `folder_memory_cn.py`) 复制到 OpenWebUI 的 `plugins/filters/` 目录(或通过管理员 UI 上传)。 1.`folder_memory.py` (或中文版 `folder_memory_cn.py`) 复制到 OpenWebUI 的 `plugins/filters/` 目录(或通过管理员 UI 上传)。

View File

@@ -22,7 +22,7 @@ Filters act as middleware in the message pipeline:
Reduces token consumption in long conversations through intelligent summarization while maintaining coherence. Reduces token consumption in long conversations through intelligent summarization while maintaining coherence.
**Version:** 1.2.1 **Version:** 1.2.2
[:octicons-arrow-right-24: Documentation](async-context-compression.md) [:octicons-arrow-right-24: Documentation](async-context-compression.md)

View File

@@ -22,7 +22,7 @@ Filter 充当消息管线中的中间件:
通过智能总结减少长对话的 token 消耗,同时保持连贯性。 通过智能总结减少长对话的 token 消耗,同时保持连贯性。
**版本:** 1.2.1 **版本:** 1.2.2
[:octicons-arrow-right-24: 查看文档](async-context-compression.md) [:octicons-arrow-right-24: 查看文档](async-context-compression.md)

View File

@@ -0,0 +1,84 @@
# GitHub Copilot SDK Pipe for OpenWebUI
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.1.0 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that allows you to use GitHub Copilot models (such as `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`) directly within OpenWebUI. It is built upon the official [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk), providing a native integration experience.
## 🚀 What's New (v0.1.0)
* **♾️ Infinite Sessions**: Automatic context compaction for long-running conversations. No more context limit errors!
* **🧠 Thinking Process**: Real-time display of model reasoning/thinking process (for supported models).
* **📂 Workspace Control**: Restricted workspace directory for secure file operations.
* **🔍 Model Filtering**: Exclude specific models using keywords (e.g., `codex`, `haiku`).
* **💾 Session Persistence**: Improved session resume logic using OpenWebUI chat ID mapping.
## ✨ Core Features
* **🚀 Official SDK Integration**: Built on the official SDK for stability and reliability.
* **💬 Multi-turn Conversation**: Automatically concatenates history context so Copilot understands your previous messages.
* **🌊 Streaming Output**: Supports typewriter effect for fast responses.
* **🖼️ Multimodal Support**: Supports image uploads, automatically converting them to attachments for Copilot (requires model support).
* **🛠️ Zero-config Installation**: Automatically detects and downloads the GitHub Copilot CLI, ready to use out of the box.
* **🔑 Secure Authentication**: Supports Fine-grained Personal Access Tokens for minimized permissions.
* **🐛 Debug Mode**: Built-in detailed log output for easy connection troubleshooting.
## 📦 Installation & Usage
### 1. Import Function
1. Open OpenWebUI.
2. Go to **Workspace** -> **Functions**.
3. Click **+** (Create Function).
4. Paste the content of `github_copilot_sdk.py` (or `github_copilot_sdk_cn.py` for Chinese) completely.
5. Save.
### 2. Configure Valves (Settings)
Find "GitHub Copilot" in the function list and click the **⚙️ (Valves)** icon to configure:
| Parameter | Description | Default |
| :--- | :--- | :--- |
| **GH_TOKEN** | **(Required)** Your GitHub Token. | - |
| **MODEL_ID** | The model name to use. Recommended `gpt-5-mini` or `gpt-5`. | `gpt-5-mini` |
| **CLI_PATH** | Path to the Copilot CLI. Will download automatically if not found. | `/usr/local/bin/copilot` |
| **DEBUG** | Whether to enable debug logs (output to chat). | `True` |
| **SHOW_THINKING** | Show model reasoning/thinking process. | `True` |
| **EXCLUDE_KEYWORDS** | Exclude models containing these keywords (comma separated). | - |
| **WORKSPACE_DIR** | Restricted workspace directory for file operations. | - |
| **INFINITE_SESSION** | Enable Infinite Sessions (automatic context compaction). | `True` |
| **COMPACTION_THRESHOLD** | Background compaction threshold (0.0-1.0). | `0.8` |
| **BUFFER_THRESHOLD** | Buffer exhaustion threshold (0.0-1.0). | `0.95` |
### 3. Get GH_TOKEN
For security, it is recommended to use a **Fine-grained Personal Access Token**:
1. Visit [GitHub Token Settings](https://github.com/settings/tokens?type=beta).
2. Click **Generate new token**.
3. **Repository access**: Select `All repositories` or `Public Repositories`.
4. **Permissions**:
* Click **Account permissions**.
* Find **Copilot Requests**, select **Read and write** (or Access).
5. Generate and copy the Token.
## 📋 Dependencies
This Pipe will automatically attempt to install the following dependencies:
* `github-copilot-sdk` (Python package)
* `github-copilot-cli` (Binary file, installed via official script)
## ⚠️ FAQ
* **Stuck on "Waiting..."**:
* Check if `GH_TOKEN` is correct and has `Copilot Requests` permission.
* Try changing `MODEL_ID` to `gpt-4o` or `copilot-chat`.
* **Images not recognized**:
* Ensure `MODEL_ID` is a model that supports multimodal input.
* **CLI Installation Failed**:
* Ensure the OpenWebUI container has internet access.
* You can manually download the CLI and specify `CLI_PATH` in Valves.
## 📄 License
MIT

View File

@@ -0,0 +1,84 @@
# GitHub Copilot SDK 官方管道
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.1.0 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,允许你直接在 OpenWebUI 中使用 GitHub Copilot 模型(如 `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`)。它基于官方 [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk) 构建,提供了原生级的集成体验。
## 🚀 最新特性 (v0.1.0)
* **♾️ 无限会话 (Infinite Sessions)**:支持长对话的自动上下文压缩,告别上下文超限错误!
* **🧠 思考过程展示**:实时显示模型的推理/思考过程(需模型支持)。
* **📂 工作目录控制**:支持设置受限工作目录,确保文件操作安全。
* **🔍 模型过滤**:支持通过关键词排除特定模型(如 `codex`, `haiku`)。
* **💾 会话持久化**: 改进的会话恢复逻辑,直接关联 OpenWebUI 聊天 ID连接更稳定。
## ✨ 核心特性
* **🚀 官方 SDK 集成**:基于官方 SDK稳定可靠。
* **💬 多轮对话支持**自动拼接历史上下文Copilot 能理解你的前文。
* **🌊 流式输出 (Streaming)**:支持打字机效果,响应迅速。
* **🖼️ 多模态支持**:支持上传图片,自动转换为附件发送给 Copilot需模型支持
* **🛠️ 零配置安装**:自动检测并下载 GitHub Copilot CLI开箱即用。
* **🔑 安全认证**:支持 Fine-grained Personal Access Tokens权限最小化。
* **🐛 调试模式**:内置详细的日志输出,方便排查连接问题。
## 📦 安装与使用
### 1. 导入函数
1. 打开 OpenWebUI。
2. 进入 **Workspace** -> **Functions**
3. 点击 **+** (创建函数)。
4.`github_copilot_sdk_cn.py` 的内容完整粘贴进去。
5. 保存。
### 2. 配置 Valves (设置)
在函数列表中找到 "GitHub Copilot",点击 **⚙️ (Valves)** 图标进行配置:
| 参数 | 说明 | 默认值 |
| :--- | :--- | :--- |
| **GH_TOKEN** | **(必填)** 你的 GitHub Token。 | - |
| **MODEL_ID** | 使用的模型名称。推荐 `gpt-5-mini``gpt-5`。 | `gpt-5-mini` |
| **CLI_PATH** | Copilot CLI 的路径。如果未找到会自动下载。 | `/usr/local/bin/copilot` |
| **DEBUG** | 是否开启调试日志(输出到对话框)。 | `True` |
| **SHOW_THINKING** | 是否显示模型推理/思考过程。 | `True` |
| **EXCLUDE_KEYWORDS** | 排除包含这些关键词的模型 (逗号分隔)。 | - |
| **WORKSPACE_DIR** | 文件操作的受限工作目录。 | - |
| **INFINITE_SESSION** | 启用无限会话 (自动上下文压缩)。 | `True` |
| **COMPACTION_THRESHOLD** | 后台压缩阈值 (0.0-1.0)。 | `0.8` |
| **BUFFER_THRESHOLD** | 缓冲耗尽阈值 (0.0-1.0)。 | `0.95` |
### 3. 获取 GH_TOKEN
为了安全起见,推荐使用 **Fine-grained Personal Access Token**
1. 访问 [GitHub Token Settings](https://github.com/settings/tokens?type=beta)。
2. 点击 **Generate new token**
3. **Repository access**: 选择 `All repositories``Public Repositories`
4. **Permissions**:
* 点击 **Account permissions**
* 找到 **Copilot Requests**,选择 **Read and write** (或 Access)。
5. 生成并复制 Token。
## 📋 依赖说明
该 Pipe 会自动尝试安装以下依赖(如果环境中缺失):
* `github-copilot-sdk` (Python 包)
* `github-copilot-cli` (二进制文件,通过官方脚本安装)
## ⚠️ 常见问题
* **一直显示 "Waiting..."**
* 检查 `GH_TOKEN` 是否正确且拥有 `Copilot Requests` 权限。
* 尝试将 `MODEL_ID` 改为 `gpt-4o``copilot-chat`
* **图片无法识别**
* 确保 `MODEL_ID` 是支持多模态的模型。
* **CLI 安装失败**
* 确保 OpenWebUI 容器有外网访问权限。
* 你可以手动下载 CLI 并挂载到容器中,然后在 Valves 中指定 `CLI_PATH`
## 📄 许可证
MIT

View File

@@ -15,7 +15,7 @@ Pipes allow you to:
## Available Pipe Plugins ## Available Pipe Plugins
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.1.1) - Official GitHub Copilot SDK integration. Supports dynamic models, multi-turn conversation, streaming, multimodal input, and infinite sessions.
--- ---

View File

@@ -15,7 +15,7 @@ Pipes 可以用于:
## 可用的 Pipe 插件 ## 可用的 Pipe 插件
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.1.1) - GitHub Copilot SDK 官方集成。支持动态模型、多轮对话、流式输出、图片输入及无限会话。
--- ---

View File

@@ -1,9 +1,13 @@
# Async Context Compression Filter # Async Context Compression Filter
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 1.2.1 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT **Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 1.2.2 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
This filter reduces token consumption in long conversations through intelligent summarization and message compression while keeping conversations coherent. This filter reduces token consumption in long conversations through intelligent summarization and message compression while keeping conversations coherent.
## What's new in 1.2.2
- **Critical Fix**: Resolved `TypeError: 'str' object is not callable` caused by variable name conflict in logging function.
- **Compatibility**: Enhanced `params` handling to support Pydantic objects, improving compatibility with different OpenWebUI versions.
## What's new in 1.2.1 ## What's new in 1.2.1
- **Smart Configuration**: Automatically detects base model settings for custom models and adds `summary_model_max_context` for independent summary limits. - **Smart Configuration**: Automatically detects base model settings for custom models and adds `summary_model_max_context` for independent summary limits.

View File

@@ -1,11 +1,15 @@
# 异步上下文压缩过滤器 # 异步上下文压缩过滤器
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 1.2.1 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT **作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 1.2.2 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
> **重要提示**:为了确保所有过滤器的可维护性和易用性,每个过滤器都应附带清晰、完整的文档,以确保其功能、配置和使用方法得到充分说明。 > **重要提示**:为了确保所有过滤器的可维护性和易用性,每个过滤器都应附带清晰、完整的文档,以确保其功能、配置和使用方法得到充分说明。
本过滤器通过智能摘要和消息压缩技术,在保持对话连贯性的同时,显著降低长对话的 Token 消耗。 本过滤器通过智能摘要和消息压缩技术,在保持对话连贯性的同时,显著降低长对话的 Token 消耗。
## 1.2.2 版本更新
- **严重错误修复**: 解决了因日志函数变量名冲突导致的 `TypeError: 'str' object is not callable` 错误。
- **兼容性增强**: 改进了 `params` 处理逻辑以支持 Pydantic 对象,提高了对不同 OpenWebUI 版本的兼容性。
## 1.2.1 版本更新 ## 1.2.1 版本更新
- **智能配置增强**: 自动检测自定义模型的基础模型配置,并新增 `summary_model_max_context` 参数以独立控制摘要模型的上下文限制。 - **智能配置增强**: 自动检测自定义模型的基础模型配置,并新增 `summary_model_max_context` 参数以独立控制摘要模型的上下文限制。

View File

@@ -5,7 +5,7 @@ author: Fu-Jie
author_url: https://github.com/Fu-Jie/awesome-openwebui author_url: https://github.com/Fu-Jie/awesome-openwebui
funding_url: https://github.com/open-webui funding_url: https://github.com/open-webui
description: Reduces token consumption in long conversations while maintaining coherence through intelligent summarization and message compression. description: Reduces token consumption in long conversations while maintaining coherence through intelligent summarization and message compression.
version: 1.2.1 version: 1.2.2
openwebui_id: b1655bc8-6de9-4cad-8cb5-a6f7829a02ce openwebui_id: b1655bc8-6de9-4cad-8cb5-a6f7829a02ce
license: MIT license: MIT
@@ -839,7 +839,7 @@ class Filter:
except Exception as e: except Exception as e:
logger.error(f"Error emitting debug log: {e}") logger.error(f"Error emitting debug log: {e}")
async def _log(self, message: str, type: str = "info", event_call=None): async def _log(self, message: str, log_type: str = "info", event_call=None):
"""Unified logging to both backend (print) and frontend (console.log)""" """Unified logging to both backend (print) and frontend (console.log)"""
# Backend logging # Backend logging
if self.valves.debug_mode: if self.valves.debug_mode:
@@ -849,11 +849,11 @@ class Filter:
if self.valves.show_debug_log and event_call: if self.valves.show_debug_log and event_call:
try: try:
css = "color: #3b82f6;" # Blue default css = "color: #3b82f6;" # Blue default
if type == "error": if log_type == "error":
css = "color: #ef4444; font-weight: bold;" # Red css = "color: #ef4444; font-weight: bold;" # Red
elif type == "warning": elif log_type == "warning":
css = "color: #f59e0b;" # Orange css = "color: #f59e0b;" # Orange
elif type == "success": elif log_type == "success":
css = "color: #10b981; font-weight: bold;" # Green css = "color: #10b981; font-weight: bold;" # Green
# Clean message for frontend: remove separators and extra newlines # Clean message for frontend: remove separators and extra newlines
@@ -999,6 +999,7 @@ class Filter:
# 2. For base models: check messages for role='system' # 2. For base models: check messages for role='system'
system_prompt_content = None system_prompt_content = None
# Try to get from DB (custom model)
# Try to get from DB (custom model) # Try to get from DB (custom model)
try: try:
model_id = body.get("model") model_id = body.get("model")
@@ -1026,12 +1027,17 @@ class Filter:
# Handle case where params is a JSON string # Handle case where params is a JSON string
if isinstance(params, str): if isinstance(params, str):
params = json.loads(params) params = json.loads(params)
# Convert Pydantic model to dict if needed
elif hasattr(params, "model_dump"):
params = params.model_dump()
elif hasattr(params, "dict"):
params = params.dict()
# Handle dict or Pydantic object # Now params should be a dict
if isinstance(params, dict): if isinstance(params, dict):
system_prompt_content = params.get("system") system_prompt_content = params.get("system")
else: else:
# Assume Pydantic model or object # Fallback: try getattr
system_prompt_content = getattr(params, "system", None) system_prompt_content = getattr(params, "system", None)
if system_prompt_content: if system_prompt_content:
@@ -1050,7 +1056,7 @@ class Filter:
if self.valves.show_debug_log and __event_call__: if self.valves.show_debug_log and __event_call__:
await self._log( await self._log(
f"[Inlet] ❌ Failed to parse model params: {e}", f"[Inlet] ❌ Failed to parse model params: {e}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1071,7 +1077,7 @@ class Filter:
if self.valves.show_debug_log and __event_call__: if self.valves.show_debug_log and __event_call__:
await self._log( await self._log(
f"[Inlet] ❌ Error fetching system prompt from DB: {e}", f"[Inlet] ❌ Error fetching system prompt from DB: {e}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
if self.valves.debug_mode: if self.valves.debug_mode:
@@ -1125,7 +1131,7 @@ class Filter:
if not chat_id: if not chat_id:
await self._log( await self._log(
"[Inlet] ❌ Missing chat_id in metadata, skipping compression", "[Inlet] ❌ Missing chat_id in metadata, skipping compression",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
return body return body
@@ -1154,7 +1160,7 @@ class Filter:
else: else:
await self._log( await self._log(
f"[Inlet] ⚠️ Invalid Model Configs (Raw: '{raw_config}'): No valid configs parsed. Expected format: 'model_id:threshold:max_context'", f"[Inlet] ⚠️ Invalid Model Configs (Raw: '{raw_config}'): No valid configs parsed. Expected format: 'model_id:threshold:max_context'",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
else: else:
@@ -1258,7 +1264,7 @@ class Filter:
if total_tokens > max_context_tokens: if total_tokens > max_context_tokens:
await self._log( await self._log(
f"[Inlet] ⚠️ Candidate prompt ({total_tokens} Tokens) exceeds limit ({max_context_tokens}). Reducing history...", f"[Inlet] ⚠️ Candidate prompt ({total_tokens} Tokens) exceeds limit ({max_context_tokens}). Reducing history...",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1395,7 +1401,7 @@ class Filter:
await self._log( await self._log(
f"[Inlet] Applied summary: {system_info} + Head({len(head_messages)} msg, {head_tokens}t) + Summary({summary_tokens}t) + Tail({len(tail_messages)} msg, {tail_tokens}t) = Total({total_section_tokens}t)", f"[Inlet] Applied summary: {system_info} + Head({len(head_messages)} msg, {head_tokens}t) + Summary({summary_tokens}t) + Tail({len(tail_messages)} msg, {tail_tokens}t) = Total({total_section_tokens}t)",
type="success", log_type="success",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1455,7 +1461,7 @@ class Filter:
if total_tokens > max_context_tokens: if total_tokens > max_context_tokens:
await self._log( await self._log(
f"[Inlet] ⚠️ Original messages ({total_tokens} Tokens) exceed limit ({max_context_tokens}). Reducing history...", f"[Inlet] ⚠️ Original messages ({total_tokens} Tokens) exceed limit ({max_context_tokens}). Reducing history...",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1523,7 +1529,7 @@ class Filter:
if not chat_id: if not chat_id:
await self._log( await self._log(
"[Outlet] ❌ Missing chat_id in metadata, skipping compression", "[Outlet] ❌ Missing chat_id in metadata, skipping compression",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
return body return body
@@ -1625,7 +1631,7 @@ class Filter:
if current_tokens >= compression_threshold_tokens: if current_tokens >= compression_threshold_tokens:
await self._log( await self._log(
f"[🔍 Background Calculation] ⚡ Compression threshold triggered (Token: {current_tokens} >= {compression_threshold_tokens})", f"[🔍 Background Calculation] ⚡ Compression threshold triggered (Token: {current_tokens} >= {compression_threshold_tokens})",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1648,7 +1654,7 @@ class Filter:
except Exception as e: except Exception as e:
await self._log( await self._log(
f"[🔍 Background Calculation] ❌ Error: {str(e)}", f"[🔍 Background Calculation] ❌ Error: {str(e)}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1687,7 +1693,7 @@ class Filter:
target_compressed_count = max(0, len(messages) - self.valves.keep_last) target_compressed_count = max(0, len(messages) - self.valves.keep_last)
await self._log( await self._log(
f"[🤖 Async Summary Task] ⚠️ target_compressed_count is None, estimating: {target_compressed_count}", f"[🤖 Async Summary Task] ⚠️ target_compressed_count is None, estimating: {target_compressed_count}",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1734,7 +1740,7 @@ class Filter:
if not summary_model_id: if not summary_model_id:
await self._log( await self._log(
"[🤖 Async Summary Task] ⚠️ Summary model does not exist, skipping compression", "[🤖 Async Summary Task] ⚠️ Summary model does not exist, skipping compression",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
return return
@@ -1765,7 +1771,7 @@ class Filter:
excess_tokens = estimated_input_tokens - max_context_tokens excess_tokens = estimated_input_tokens - max_context_tokens
await self._log( await self._log(
f"[🤖 Async Summary Task] ⚠️ Middle messages ({middle_tokens} Tokens) + Buffer exceed summary model limit ({max_context_tokens}), need to remove approx {excess_tokens} Tokens", f"[🤖 Async Summary Task] ⚠️ Middle messages ({middle_tokens} Tokens) + Buffer exceed summary model limit ({max_context_tokens}), need to remove approx {excess_tokens} Tokens",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1822,7 +1828,7 @@ class Filter:
if not new_summary: if not new_summary:
await self._log( await self._log(
"[🤖 Async Summary Task] ⚠️ Summary generation returned empty result, skipping save", "[🤖 Async Summary Task] ⚠️ Summary generation returned empty result, skipping save",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
return return
@@ -1851,7 +1857,7 @@ class Filter:
await self._log( await self._log(
f"[🤖 Async Summary Task] ✅ Complete! New summary length: {len(new_summary)} characters", f"[🤖 Async Summary Task] ✅ Complete! New summary length: {len(new_summary)} characters",
type="success", log_type="success",
event_call=__event_call__, event_call=__event_call__,
) )
await self._log( await self._log(
@@ -1957,14 +1963,14 @@ class Filter:
except Exception as e: except Exception as e:
await self._log( await self._log(
f"[Status] Error calculating tokens: {e}", f"[Status] Error calculating tokens: {e}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
except Exception as e: except Exception as e:
await self._log( await self._log(
f"[🤖 Async Summary Task] ❌ Error: {str(e)}", f"[🤖 Async Summary Task] ❌ Error: {str(e)}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -2066,7 +2072,7 @@ Based on the content above, generate the summary:
if not model: if not model:
await self._log( await self._log(
"[🤖 LLM Call] ⚠️ Summary model does not exist, skipping summary generation", "[🤖 LLM Call] ⚠️ Summary model does not exist, skipping summary generation",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
return "" return ""
@@ -2133,7 +2139,7 @@ Based on the content above, generate the summary:
await self._log( await self._log(
f"[🤖 LLM Call] ✅ Successfully received summary", f"[🤖 LLM Call] ✅ Successfully received summary",
type="success", log_type="success",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -2154,7 +2160,7 @@ Based on the content above, generate the summary:
await self._log( await self._log(
f"[🤖 LLM Call] ❌ {error_message}", f"[🤖 LLM Call] ❌ {error_message}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )

View File

@@ -5,7 +5,7 @@ author: Fu-Jie
author_url: https://github.com/Fu-Jie/awesome-openwebui author_url: https://github.com/Fu-Jie/awesome-openwebui
funding_url: https://github.com/open-webui funding_url: https://github.com/open-webui
description: 通过智能摘要和消息压缩,降低长对话的 token 消耗,同时保持对话连贯性。 description: 通过智能摘要和消息压缩,降低长对话的 token 消耗,同时保持对话连贯性。
version: 1.2.1 version: 1.2.2
openwebui_id: 5c0617cb-a9e4-4bd6-a440-d276534ebd18 openwebui_id: 5c0617cb-a9e4-4bd6-a440-d276534ebd18
license: MIT license: MIT
@@ -787,7 +787,7 @@ class Filter:
except Exception as e: except Exception as e:
print(f"Error emitting debug log: {e}") print(f"Error emitting debug log: {e}")
async def _log(self, message: str, type: str = "info", event_call=None): async def _log(self, message: str, log_type: str = "info", event_call=None):
"""统一日志输出到后端 (print) 和前端 (console.log)""" """统一日志输出到后端 (print) 和前端 (console.log)"""
# 后端日志 # 后端日志
if self.valves.debug_mode: if self.valves.debug_mode:
@@ -797,11 +797,11 @@ class Filter:
if self.valves.show_debug_log and event_call: if self.valves.show_debug_log and event_call:
try: try:
css = "color: #3b82f6;" # 默认蓝色 css = "color: #3b82f6;" # 默认蓝色
if type == "error": if log_type == "error":
css = "color: #ef4444; font-weight: bold;" # 红色 css = "color: #ef4444; font-weight: bold;" # 红色
elif type == "warning": elif log_type == "warning":
css = "color: #f59e0b;" # 橙色 css = "color: #f59e0b;" # 橙色
elif type == "success": elif log_type == "success":
css = "color: #10b981; font-weight: bold;" # 绿色 css = "color: #10b981; font-weight: bold;" # 绿色
# 清理前端消息:移除分隔符和多余换行 # 清理前端消息:移除分隔符和多余换行
@@ -948,12 +948,17 @@ class Filter:
# 处理 params 是 JSON 字符串的情况 # 处理 params 是 JSON 字符串的情况
if isinstance(params, str): if isinstance(params, str):
params = json.loads(params) params = json.loads(params)
# 转换 Pydantic 模型为字典
elif hasattr(params, "model_dump"):
params = params.model_dump()
elif hasattr(params, "dict"):
params = params.dict()
# 处理字典或 Pydantic 对象 # 处理字典
if isinstance(params, dict): if isinstance(params, dict):
system_prompt_content = params.get("system") system_prompt_content = params.get("system")
else: else:
# 假设是 Pydantic 模型或对象 # 回退:尝试 getattr
system_prompt_content = getattr(params, "system", None) system_prompt_content = getattr(params, "system", None)
if system_prompt_content: if system_prompt_content:
@@ -972,7 +977,7 @@ class Filter:
if self.valves.show_debug_log and __event_call__: if self.valves.show_debug_log and __event_call__:
await self._log( await self._log(
f"[Inlet] ❌ 解析模型参数失败: {e}", f"[Inlet] ❌ 解析模型参数失败: {e}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -986,7 +991,7 @@ class Filter:
if self.valves.show_debug_log and __event_call__: if self.valves.show_debug_log and __event_call__:
await self._log( await self._log(
f"[Inlet] ❌ 数据库中未找到模型", f"[Inlet] ❌ 数据库中未找到模型",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -994,7 +999,7 @@ class Filter:
if self.valves.show_debug_log and __event_call__: if self.valves.show_debug_log and __event_call__:
await self._log( await self._log(
f"[Inlet] ❌ 从数据库获取系统提示词错误: {e}", f"[Inlet] ❌ 从数据库获取系统提示词错误: {e}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
if self.valves.debug_mode: if self.valves.debug_mode:
@@ -1048,7 +1053,7 @@ class Filter:
if not chat_id: if not chat_id:
await self._log( await self._log(
"[Inlet] ❌ metadata 中缺少 chat_id跳过压缩", "[Inlet] ❌ metadata 中缺少 chat_id跳过压缩",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
return body return body
@@ -1154,7 +1159,7 @@ class Filter:
if total_tokens > max_context_tokens: if total_tokens > max_context_tokens:
await self._log( await self._log(
f"[Inlet] ⚠️ 候选提示词 ({total_tokens} Tokens) 超过上限 ({max_context_tokens})。正在缩减历史记录...", f"[Inlet] ⚠️ 候选提示词 ({total_tokens} Tokens) 超过上限 ({max_context_tokens})。正在缩减历史记录...",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1290,7 +1295,7 @@ class Filter:
await self._log( await self._log(
f"[Inlet] 应用摘要: {system_info} + Head({len(head_messages)} 条, {head_tokens}t) + Summary({summary_tokens}t) + Tail({len(tail_messages)} 条, {tail_tokens}t) = Total({total_section_tokens}t)", f"[Inlet] 应用摘要: {system_info} + Head({len(head_messages)} 条, {head_tokens}t) + Summary({summary_tokens}t) + Tail({len(tail_messages)} 条, {tail_tokens}t) = Total({total_section_tokens}t)",
type="success", log_type="success",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1350,7 +1355,7 @@ class Filter:
if total_tokens > max_context_tokens: if total_tokens > max_context_tokens:
await self._log( await self._log(
f"[Inlet] ⚠️ 原始消息 ({total_tokens} Tokens) 超过上限 ({max_context_tokens})。正在缩减历史记录...", f"[Inlet] ⚠️ 原始消息 ({total_tokens} Tokens) 超过上限 ({max_context_tokens})。正在缩减历史记录...",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1420,7 +1425,7 @@ class Filter:
if not chat_id: if not chat_id:
await self._log( await self._log(
"[Outlet] ❌ metadata 中缺少 chat_id跳过压缩", "[Outlet] ❌ metadata 中缺少 chat_id跳过压缩",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
return body return body
@@ -1486,7 +1491,7 @@ class Filter:
if current_tokens >= compression_threshold_tokens: if current_tokens >= compression_threshold_tokens:
await self._log( await self._log(
f"[🔍 后台计算] ⚡ 触发压缩阈值 (Token: {current_tokens} >= {compression_threshold_tokens})", f"[🔍 后台计算] ⚡ 触发压缩阈值 (Token: {current_tokens} >= {compression_threshold_tokens})",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1509,7 +1514,7 @@ class Filter:
except Exception as e: except Exception as e:
await self._log( await self._log(
f"[🔍 后台计算] ❌ 错误: {str(e)}", f"[🔍 后台计算] ❌ 错误: {str(e)}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1546,7 +1551,7 @@ class Filter:
target_compressed_count = max(0, len(messages) - self.valves.keep_last) target_compressed_count = max(0, len(messages) - self.valves.keep_last)
await self._log( await self._log(
f"[🤖 异步摘要任务] ⚠️ target_compressed_count 为 None进行估算: {target_compressed_count}", f"[🤖 异步摘要任务] ⚠️ target_compressed_count 为 None进行估算: {target_compressed_count}",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1593,7 +1598,7 @@ class Filter:
if not summary_model_id: if not summary_model_id:
await self._log( await self._log(
"[🤖 异步摘要任务] ⚠️ 摘要模型不存在,跳过压缩", "[🤖 异步摘要任务] ⚠️ 摘要模型不存在,跳过压缩",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
return return
@@ -1624,7 +1629,7 @@ class Filter:
excess_tokens = estimated_input_tokens - max_context_tokens excess_tokens = estimated_input_tokens - max_context_tokens
await self._log( await self._log(
f"[🤖 异步摘要任务] ⚠️ 中间消息 ({middle_tokens} Tokens) + 缓冲超过摘要模型上限 ({max_context_tokens}),需要移除约 {excess_tokens} Token", f"[🤖 异步摘要任务] ⚠️ 中间消息 ({middle_tokens} Tokens) + 缓冲超过摘要模型上限 ({max_context_tokens}),需要移除约 {excess_tokens} Token",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1681,7 +1686,7 @@ class Filter:
if not new_summary: if not new_summary:
await self._log( await self._log(
"[🤖 异步摘要任务] ⚠️ 摘要生成返回空结果,跳过保存", "[🤖 异步摘要任务] ⚠️ 摘要生成返回空结果,跳过保存",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
return return
@@ -1710,7 +1715,7 @@ class Filter:
await self._log( await self._log(
f"[🤖 异步摘要任务] ✅ 完成!新摘要长度: {len(new_summary)} 字符", f"[🤖 异步摘要任务] ✅ 完成!新摘要长度: {len(new_summary)} 字符",
type="success", log_type="success",
event_call=__event_call__, event_call=__event_call__,
) )
await self._log( await self._log(
@@ -1821,14 +1826,14 @@ class Filter:
except Exception as e: except Exception as e:
await self._log( await self._log(
f"[Status] 计算 Token 错误: {e}", f"[Status] 计算 Token 错误: {e}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
except Exception as e: except Exception as e:
await self._log( await self._log(
f"[🤖 异步摘要任务] ❌ 错误: {str(e)}", f"[🤖 异步摘要任务] ❌ 错误: {str(e)}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -1928,7 +1933,7 @@ class Filter:
if not model: if not model:
await self._log( await self._log(
"[🤖 LLM 调用] ⚠️ 摘要模型不存在,跳过摘要生成", "[🤖 LLM 调用] ⚠️ 摘要模型不存在,跳过摘要生成",
type="warning", log_type="warning",
event_call=__event_call__, event_call=__event_call__,
) )
return "" return ""
@@ -1995,7 +2000,7 @@ class Filter:
await self._log( await self._log(
f"[🤖 LLM 调用] ✅ 成功接收摘要", f"[🤖 LLM 调用] ✅ 成功接收摘要",
type="success", log_type="success",
event_call=__event_call__, event_call=__event_call__,
) )
@@ -2016,7 +2021,7 @@ class Filter:
await self._log( await self._log(
f"[🤖 LLM 调用] ❌ {error_message}", f"[🤖 LLM 调用] ❌ {error_message}",
type="error", log_type="error",
event_call=__event_call__, event_call=__event_call__,
) )

View File

@@ -1,10 +1,17 @@
# Folder Memory # Folder Memory
English | [中文](./README_CN.md) **Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.1.0 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
**Folder Memory** (formerly Folder Rule Collector) is an intelligent context filter plugin for OpenWebUI. It automatically extracts consistent "Project Rules" from ongoing conversations within a folder and injects them back into the folder's system prompt. ---
This ensures that all future conversations within that folder share the same evolved context and rules, without manual updates. ### 📌 What's new in 0.1.0
- **Initial Release**: Automated "Project Rules" management for OpenWebUI folders.
- **Folder-Level Persistence**: Automatically updates folder system prompts with extracted rules.
- **Optimized Performance**: Runs asynchronously and supports `PRIORITY` configuration for seamless integration with other filters.
---
**Folder Memory** is an intelligent context filter plugin for OpenWebUI. It automatically extracts consistent "Project Rules" from ongoing conversations within a folder and injects them back into the folder's system prompt.
## ✨ Features ## ✨ Features
@@ -13,6 +20,10 @@ This ensures that all future conversations within that folder share the same evo
- **Async Processing**: Runs in the background without blocking the user's chat experience. - **Async Processing**: Runs in the background without blocking the user's chat experience.
- **ORM Integration**: Directly updates folder data using OpenWebUI's internal models for reliability. - **ORM Integration**: Directly updates folder data using OpenWebUI's internal models for reliability.
## ⚠️ Prerequisites
- **Conversations must occur inside a folder.** This plugin only triggers when a chat belongs to a folder (i.e., you need to create a folder in OpenWebUI and start a conversation within it).
## 📦 Installation ## 📦 Installation
1. Copy `folder_memory.py` to your OpenWebUI `plugins/filters/` directory (or upload via Admin UI). 1. Copy `folder_memory.py` to your OpenWebUI `plugins/filters/` directory (or upload via Admin UI).

View File

@@ -1,8 +1,17 @@
# 文件夹记忆 (Folder Memory) # 文件夹记忆 (Folder Memory)
[English](./README.md) | 中文 **作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.1.0 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
**文件夹记忆 (Folder Memory)** (原名 Folder Rule Collector) 是一个 OpenWebUI 的智能上下文过滤器插件。它能自动从文件夹内的对话中提取一致性的“项目规则”,并将其回写到文件夹的系统提示词中。 ---
### 📌 0.1.0 版本特性
- **首个版本发布**:专注于自动化的“项目规则”管理。
- **文件夹级持久化**:自动将提取的规则回写到文件夹系统提示词中。
- **性能优化**:采用异步处理机制,并支持 `PRIORITY` 配置,确保与其他过滤器(如上下文压缩)完美协作。
---
**文件夹记忆 (Folder Memory)** 是一个 OpenWebUI 的智能上下文过滤器插件。它能自动从文件夹内的对话中提取一致性的“项目规则”,并将其回写到文件夹的系统提示词中。
这确保了该文件夹内的所有未来对话都能共享相同的进化上下文和规则,无需手动更新。 这确保了该文件夹内的所有未来对话都能共享相同的进化上下文和规则,无需手动更新。
@@ -13,6 +22,10 @@
- **异步处理**:在后台运行,不阻塞用户的聊天体验。 - **异步处理**:在后台运行,不阻塞用户的聊天体验。
- **ORM 集成**:直接使用 OpenWebUI 的内部模型更新文件夹数据,确保可靠性。 - **ORM 集成**:直接使用 OpenWebUI 的内部模型更新文件夹数据,确保可靠性。
## ⚠️ 前置条件
- **对话必须在文件夹内进行。** 此插件仅在聊天属于某个文件夹时触发(即您需要先在 OpenWebUI 中创建一个文件夹,并在其内部开始对话)。
## 📦 安装指南 ## 📦 安装指南
1.`folder_memory.py` (或中文版 `folder_memory_cn.py`) 复制到 OpenWebUI 的 `plugins/filters/` 目录(或通过管理员 UI 上传)。 1.`folder_memory.py` (或中文版 `folder_memory_cn.py`) 复制到 OpenWebUI 的 `plugins/filters/` 目录(或通过管理员 UI 上传)。

View File

@@ -0,0 +1,114 @@
# GitHub Copilot SDK Pipe for OpenWebUI
**Author:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **Version:** 0.2.3 | **Project:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **License:** MIT
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that allows you to use GitHub Copilot models (such as `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`) directly within OpenWebUI. It is built upon the official [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk), providing a native integration experience.
## 🚀 What's New (v0.2.3)
* **🧩 Per-user Overrides**: Added user-level overrides for `REASONING_EFFORT`, `CLI_PATH`, `DEBUG`, `SHOW_THINKING`, and `MODEL_ID`.
* **🧠 Thinking Output Reliability**: Thinking visibility now respects the user setting and is correctly passed into streaming.
* **📝 Formatting Enforcement**: Added automatic formatting hints to ensure outputs are well-structured (paragraphs, lists) and addressed "tight output" issues.
## ✨ Core Features
* **🚀 Official SDK Integration**: Built on the official SDK for stability and reliability.
* **🛠️ Custom Tools Support**: Example tools included (random number). Easy to extend with your own tools.
* **💬 Multi-turn Conversation**: Automatically concatenates history context so Copilot understands your previous messages.
* **🌊 Streaming Output**: Supports typewriter effect for fast responses.
* **🖼️ Multimodal Support**: Supports image uploads, automatically converting them to attachments for Copilot (requires model support).
* **🛠️ Zero-config Installation**: Automatically detects and downloads the GitHub Copilot CLI, ready to use out of the box.
* **🔑 Secure Authentication**: Supports Fine-grained Personal Access Tokens for minimized permissions.
* **🐛 Debug Mode**: Built-in detailed log output (browser console) for easy troubleshooting.
* **⚠️ Single Node Only**: Due to local session storage, this plugin currently supports single-node OpenWebUI deployment or multi-node with sticky sessions enabled.
## 📦 Installation & Usage
### 1. Import Function
1. Open OpenWebUI.
2. Go to **Workspace** -> **Functions**.
3. Click **+** (Create Function).
4. Paste the content of `github_copilot_sdk.py` (or `github_copilot_sdk_cn.py` for Chinese) completely.
5. Save.
### 2. Configure Valves (Settings)
Find "GitHub Copilot" in the function list and click the **⚙️ (Valves)** icon to configure:
| Parameter | Description | Default |
| :--- | :--- | :--- |
| **GH_TOKEN** | **(Required)** Your GitHub Token. | - |
| **MODEL_ID** | The model name to use. | `gpt-5-mini` |
| **CLI_PATH** | Path to the Copilot CLI. Will download automatically if not found. | `/usr/local/bin/copilot` |
| **DEBUG** | Whether to enable debug logs (output to browser console). | `False` |
| **LOG_LEVEL** | Copilot CLI log level: none, error, warning, info, debug, all. | `error` |
| **SHOW_THINKING** | Show model reasoning/thinking process (requires streaming + model support). | `True` |
| **SHOW_WORKSPACE_INFO** | Show session workspace path and summary in debug mode. | `True` |
| **EXCLUDE_KEYWORDS** | Exclude models containing these keywords (comma separated). | - |
| **WORKSPACE_DIR** | Restricted workspace directory for file operations. | - |
| **INFINITE_SESSION** | Enable Infinite Sessions (automatic context compaction). | `True` |
| **COMPACTION_THRESHOLD** | Background compaction threshold (0.0-1.0). | `0.8` |
| **BUFFER_THRESHOLD** | Buffer exhaustion threshold (0.0-1.0). | `0.95` |
| **TIMEOUT** | Timeout for each stream chunk (seconds). | `300` |
| **CUSTOM_ENV_VARS** | Custom environment variables (JSON format). | - |
| **REASONING_EFFORT** | Reasoning effort level: low, medium, high. `xhigh` is supported for gpt-5.2-codex. | `medium` |
| **ENFORCE_FORMATTING** | Add formatting instructions to system prompt for better readability. | `True` |
| **ENABLE_TOOLS** | Enable custom tools (example: random number). | `False` |
| **AVAILABLE_TOOLS** | Available tools: 'all' or comma-separated list. | `all` |
#### User Valves (per-user overrides)
These optional settings can be set per user (overrides global Valves):
| Parameter | Description | Default |
| :--- | :--- | :--- |
| **REASONING_EFFORT** | Reasoning effort level (low/medium/high/xhigh). | - |
| **CLI_PATH** | Custom path to Copilot CLI. | - |
| **DEBUG** | Enable technical debug logs. | `False` |
| **SHOW_THINKING** | Show model reasoning/thinking process (requires streaming + model support). | `True` |
| **MODEL_ID** | Custom model ID. | - |
### 3. Using Custom Tools (🆕 Optional)
This pipe includes **1 example tool** to demonstrate tool calling:
* **🎲 generate_random_number**: Generate random integers
**To enable:**
1. Set `ENABLE_TOOLS: true` in Valves
2. Try: "Give me a random number"
**📚 For detailed usage and creating your own tools, see [TOOLS_USAGE.md](TOOLS_USAGE.md)**
### 4. Get GH_TOKEN
For security, it is recommended to use a **Fine-grained Personal Access Token**:
1. Visit [GitHub Token Settings](https://github.com/settings/tokens?type=beta).
2. Click **Generate new token**.
3. **Repository access**: Select **Public repositories** (Required to access Copilot permissions).
4. **Permissions**:
* Click **Account permissions**.
* Find **Copilot Requests** (It defaults to **Read-only**, no selection needed).
5. Generate and copy the Token.
## 📋 Dependencies
This Pipe will automatically attempt to install the following dependencies:
* `github-copilot-sdk` (Python package)
* `github-copilot-cli` (Binary file, installed via official script)
## ⚠️ FAQ
* **Stuck on "Waiting..."**:
* Check if `GH_TOKEN` is correct and has `Copilot Requests` permission.
* **Images not recognized**:
* Ensure `MODEL_ID` is a model that supports multimodal input.
* **Thinking not shown**:
* Ensure **streaming is enabled** and the selected model supports reasoning output.
* **CLI Installation Failed**:
* Ensure the OpenWebUI container has internet access.
* You can manually download the CLI and specify `CLI_PATH` in Valves.

View File

@@ -0,0 +1,114 @@
# GitHub Copilot SDK 官方管道
**作者:** [Fu-Jie](https://github.com/Fu-Jie/awesome-openwebui) | **版本:** 0.2.3 | **项目:** [Awesome OpenWebUI](https://github.com/Fu-Jie/awesome-openwebui) | **许可证:** MIT
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,允许你直接在 OpenWebUI 中使用 GitHub Copilot 模型(如 `gpt-5`, `gpt-5-mini`, `claude-sonnet-4.5`)。它基于官方 [GitHub Copilot SDK for Python](https://github.com/github/copilot-sdk) 构建,提供了原生级的集成体验。
## 🚀 最新特性 (v0.2.3)
* **🧩 用户级覆盖**:新增 `REASONING_EFFORT``CLI_PATH``DEBUG``SHOW_THINKING``MODEL_ID` 的用户级覆盖。
* **🧠 思考输出可靠性**:思考显示会遵循用户设置,并正确传递到流式输出中。
* **📝 格式化输出增强**:自动优化输出格式(短句、段落、列表),并解决了在某些界面下显示过于紧凑的问题。
## ✨ 核心特性
* **🚀 官方 SDK 集成**:基于官方 SDK稳定可靠。
* **🛠️ 自定义工具支持**:内置示例工具(随机数)。易于扩展自定义工具。
* **💬 多轮对话支持**自动拼接历史上下文Copilot 能理解你的前文。
* **🌊 流式输出 (Streaming)**:支持打字机效果,响应迅速。
* **🖼️ 多模态支持**:支持上传图片,自动转换为附件发送给 Copilot需模型支持
* **🛠️ 零配置安装**:自动检测并下载 GitHub Copilot CLI开箱即用。
* **🔑 安全认证**:支持 Fine-grained Personal Access Tokens权限最小化。
* **🐛 调试模式**:内置详细的日志输出(浏览器控制台),方便排查问题。
* **⚠️ 仅支持单节点**:由于会话状态存储在本地,本插件目前仅支持 OpenWebUI 单节点部署,或开启了会话粘性 (Sticky Session) 的多节点集群。
## 📦 安装与使用
### 1. 导入函数
1. 打开 OpenWebUI。
2. 进入 **Workspace** -> **Functions**
3. 点击 **+** (创建函数)。
4.`github_copilot_sdk_cn.py` 的内容完整粘贴进去。
5. 保存。
### 2. 配置 Valves (设置)
在函数列表中找到 "GitHub Copilot",点击 **⚙️ (Valves)** 图标进行配置:
| 参数 | 说明 | 默认值 |
| :--- | :--- | :--- |
| **GH_TOKEN** | **(必填)** 你的 GitHub Token。 | - |
| **MODEL_ID** | 使用的模型名称。 | `gpt-5-mini` |
| **CLI_PATH** | Copilot CLI 的路径。如果未找到会自动下载。 | `/usr/local/bin/copilot` |
| **DEBUG** | 是否开启调试日志(输出到浏览器控制台)。 | `False` |
| **LOG_LEVEL** | Copilot CLI 日志级别: none, error, warning, info, debug, all。 | `error` |
| **SHOW_THINKING** | 是否显示模型推理/思考过程(需开启流式 + 模型支持)。 | `True` |
| **SHOW_WORKSPACE_INFO** | 在调试模式下显示会话工作空间路径和摘要。 | `True` |
| **EXCLUDE_KEYWORDS** | 排除包含这些关键词的模型 (逗号分隔)。 | - |
| **WORKSPACE_DIR** | 文件操作的受限工作目录。 | - |
| **INFINITE_SESSION** | 启用无限会话 (自动上下文压缩)。 | `True` |
| **COMPACTION_THRESHOLD** | 后台压缩阈值 (0.0-1.0)。 | `0.8` |
| **BUFFER_THRESHOLD** | 缓冲耗尽阈值 (0.0-1.0)。 | `0.95` |
| **TIMEOUT** | 流式数据块超时时间 (秒)。 | `300` |
| **CUSTOM_ENV_VARS** | 自定义环境变量 (JSON 格式)。 | - |
| **ENABLE_TOOLS** | 启用自定义工具 (示例:随机数)。 | `False` |
| **AVAILABLE_TOOLS** | 可用工具: 'all' 或逗号分隔列表。 | `all` |
| **REASONING_EFFORT** | 推理强度级别low, medium, high。`gpt-5.2-codex`额外支持`xhigh`。 | `medium` |
| **ENFORCE_FORMATTING** | 是否强制添加格式化指导,以提高输出可读性。 | `True` |
#### 用户 Valves按用户覆盖
以下设置可按用户单独配置(覆盖全局 Valves
| 参数 | 说明 | 默认值 |
| :--- | :--- | :--- |
| **REASONING_EFFORT** | 推理强度级别low/medium/high/xhigh。 | - |
| **CLI_PATH** | 自定义 Copilot CLI 路径。 | - |
| **DEBUG** | 是否启用技术调试日志。 | `False` |
| **SHOW_THINKING** | 是否显示思考过程(需开启流式 + 模型支持)。 | `True` |
| **MODEL_ID** | 自定义模型 ID。 | - |
### 3. 使用自定义工具 (🆕 可选)
本 Pipe 内置了 **1 个示例工具**来展示工具调用功能:
* **🎲 generate_random_number**:生成随机整数
**启用方法:**
1. 在 Valves 中设置 `ENABLE_TOOLS: true`
2. 尝试问:“给我一个随机数”
**📚 详细使用说明和创建自定义工具,请参阅 [TOOLS_USAGE.md](TOOLS_USAGE.md)**
### 4. 获取 GH_TOKEN
为了安全起见,推荐使用 **Fine-grained Personal Access Token**
1. 访问 [GitHub Token Settings](https://github.com/settings/tokens?type=beta)。
2. 点击 **Generate new token**
3. **Repository access**: 选择 **Public repositories** (必须选择此项才能看到 Copilot 权限)。
4. **Permissions**:
* 点击 **Account permissions**
* 找到 **Copilot Requests** (默认即为 **Read-only**,无需手动修改)。
5. 生成并复制 Token。
## 📋 依赖说明
该 Pipe 会自动尝试安装以下依赖(如果环境中缺失):
* `github-copilot-sdk` (Python 包)
* `github-copilot-cli` (二进制文件,通过官方脚本安装)
## ⚠️ 常见问题
* **一直显示 "Waiting..."**
* 检查 `GH_TOKEN` 是否正确且拥有 `Copilot Requests` 权限。
* **图片无法识别**
* 确保 `MODEL_ID` 是支持多模态的模型。
* **CLI 安装失败**
* 确保 OpenWebUI 容器有外网访问权限。
* 你可以手动下载 CLI 并挂载到容器中,然后在 Valves 中指定 `CLI_PATH`
* **看不到思考过程**
* 确认已开启**流式输出**,且所选模型支持推理输出。

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -217,6 +217,23 @@ def format_markdown_table(plugins: list[dict]) -> str:
return "\n".join(lines) return "\n".join(lines)
def _get_readme_url(file_path: str) -> str:
"""
Generate GitHub README URL from plugin file path.
从插件文件路径生成 GitHub README 链接。
"""
if not file_path:
return ""
# Extract plugin directory (e.g., plugins/filters/folder-memory/folder_memory.py -> plugins/filters/folder-memory)
from pathlib import Path
plugin_dir = Path(file_path).parent
# Convert to GitHub URL
return (
f"https://github.com/Fu-Jie/awesome-openwebui/blob/main/{plugin_dir}/README.md"
)
def format_release_notes( def format_release_notes(
comparison: dict[str, list], ignore_removed: bool = False comparison: dict[str, list], ignore_removed: bool = False
) -> str: ) -> str:
@@ -229,9 +246,12 @@ def format_release_notes(
if comparison["added"]: if comparison["added"]:
lines.append("### 新增插件 / New Plugins") lines.append("### 新增插件 / New Plugins")
for plugin in comparison["added"]: for plugin in comparison["added"]:
readme_url = _get_readme_url(plugin.get("file_path", ""))
lines.append(f"- **{plugin['title']}** v{plugin['version']}") lines.append(f"- **{plugin['title']}** v{plugin['version']}")
if plugin.get("description"): if plugin.get("description"):
lines.append(f" - {plugin['description']}") lines.append(f" - {plugin['description']}")
if readme_url:
lines.append(f" - 📖 [README / 文档]({readme_url})")
lines.append("") lines.append("")
if comparison["updated"]: if comparison["updated"]:
@@ -258,7 +278,10 @@ def format_release_notes(
) )
prev_ver = prev_manifest.get("version") or prev.get("version") prev_ver = prev_manifest.get("version") or prev.get("version")
readme_url = _get_readme_url(curr.get("file_path", ""))
lines.append(f"- **{curr_title}**: v{prev_ver} → v{curr_ver}") lines.append(f"- **{curr_title}**: v{prev_ver} → v{curr_ver}")
if readme_url:
lines.append(f" - 📖 [README / 文档]({readme_url})")
lines.append("") lines.append("")
if comparison["removed"] and not ignore_removed: if comparison["removed"] and not ignore_removed:

View File

@@ -473,10 +473,27 @@ class OpenWebUICommunityClient:
# 查找 README # 查找 README
readme_content = self._find_readme(file_path) readme_content = self._find_readme(file_path)
# 获取远程帖子信息(提前获取,用于判断是否需要上传图片)
remote_post = None
if post_id:
remote_post = self.get_post(post_id)
# 查找并上传图片 # 查找并上传图片
media_urls = None media_urls = None
image_path = self._find_image(file_path) image_path = self._find_image(file_path)
if image_path:
# 决定是否上传图片
should_upload_image = True
if remote_post:
remote_media = remote_post.get("media", [])
if remote_media and len(remote_media) > 0:
# 远程已有图片,跳过上传以避免覆盖(防止出现空白图片问题)
print(
f" Remote post already has images. Skipping auto-upload to preserve existing media."
)
should_upload_image = False
if image_path and should_upload_image:
print(f" Found image: {os.path.basename(image_path)}") print(f" Found image: {os.path.basename(image_path)}")
image_url = self.upload_image(image_path) image_url = self.upload_image(image_path)
if image_url: if image_url:
@@ -500,7 +517,8 @@ class OpenWebUICommunityClient:
post_id = existing_post.get("id") post_id = existing_post.get("id")
print(f" Found existing post: {title} (ID: {post_id})") print(f" Found existing post: {title} (ID: {post_id})")
self._inject_id_to_file(file_path, post_id) self._inject_id_to_file(file_path, post_id)
# post_id 已设置,后续将进入更新流程 # post_id 已设置,重新获取 remote_post 以便后续版本检查
remote_post = self.get_post(post_id)
else: else:
# 2. 如果没找到,且允许自动创建,则创建 # 2. 如果没找到,且允许自动创建,则创建
@@ -522,11 +540,6 @@ class OpenWebUICommunityClient:
return True, f"Created new post (ID: {new_post_id})" return True, f"Created new post (ID: {new_post_id})"
return False, "Failed to create new post" return False, "Failed to create new post"
# 获取远程帖子信息(只需获取一次)
remote_post = None
if post_id:
remote_post = self.get_post(post_id)
# 版本检查(仅对更新有效) # 版本检查(仅对更新有效)
if not force and local_version and remote_post: if not force and local_version and remote_post:
remote_version = ( remote_version = (