docs: add GitHub Copilot SDK pipe masterclass cases and documentation updates

This commit is contained in:
fujie
2026-02-10 21:38:54 +08:00
parent df977a7ccc
commit b04112a261
10 changed files with 334 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ Pipes allow you to:
## Available Pipe Plugins
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.6.2) - Official GitHub Copilot SDK integration. Features **Workspace Isolation**, **Database Persistence**, **Zero-config OpenWebUI Tool Bridge**, **BYOK** support, and **dynamic MCP discovery**. Supports streaming, multimodal, and infinite sessions. [View Deep Dive](github-copilot-sdk-deep-dive.md) | [**View Advanced Tutorial**](github-copilot-sdk-tutorial.md).
- **[Case Study: GitHub 100 Star Growth Analysis](star-prediction-example.md)** - Learn how to use the GitHub Copilot SDK Pipe with Minimax 2.1 to automatically analyze CSV data and generate project growth reports.
- **[Case Study: High-Quality Video to GIF Conversion](video-processing-example.md)** - See how the model uses system-level FFmpeg to accelerate, scale, and optimize colors for screen recordings.
---

View File

@@ -16,6 +16,8 @@ Pipes 可以用于:
## 可用的 Pipe 插件
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.6.2) - GitHub Copilot SDK 官方集成。具备**工作区安全隔离**、**数据库持久化**、**零配置工具桥接**与**BYOK (自带 Key) 支持**。支持流式输出、打字机思考过程及无限会话。[查看深度架构解析](github-copilot-sdk-deep-dive.zh.md) | [**查看进阶实战教程**](github-copilot-sdk-tutorial.zh.md)。
- **[实战案例GitHub 100 Star 增长预测](star-prediction-example.zh.md)** - 展示如何使用 GitHub Copilot SDK Pipe 结合 Minimax 2.1 模型,自动编写脚本分析 CSV 数据并生成详细的项目增长报告。
- **[实战案例:视频高质量 GIF 转换与加速](video-processing-example.zh.md)** - 演示模型如何通过底层 FFmpeg 工具对录屏进行加速、缩放及双阶段色彩优化处理。
---

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

View File

@@ -0,0 +1,91 @@
# Case Study: GitHub 100 Star Growth Analysis
This case study demonstrates how to use the **GitHub Copilot SDK Pipe** with the **Minimax 2.1** model to perform a deep analysis of project growth data and predict the milestone of reaching 100 stars.
---
## 🎥 Recording
![Analysis Process Demo](./star-prediction-demo.gif)
> **Scenario**: The user uploaded project traffic CSVs and star history data for the last 14 days. The model automatically wrote a Python script for regression analysis, generated an interactive visualization, and provided a detailed growth projection report.
---
## 🛠️ Implementation
- **Plugin Type**: Pipe (GitHub Copilot SDK)
- **Base Model**: Minimax 2.1 (via Pipe integration)
- **Key Capabilities**:
- **File Processing**: Automatically reads and parses multiple CSV data files.
- **Code Generation & Execution**: On-the-fly Python scripting to calculate growth rates, conversion rates, and median trends.
- **Multimodal Output**: Generates Markdown reports, interactive HTML dashboards, and Mermaid timeline charts.
---
## 💬 Conversation Highlights
### 📥 Import Conversation
You can download the raw chat data and import it into your Open WebUI to see the full tool calls and analysis logic:
[:material-download: Download Chat JSON](./star-prediction-chat.json)
> **How to Import?**
> In Open WebUI, click your **User Avatar** (bottom of left sidebar) -> **Settings** -> **Data** -> **Import Chats**, then select the downloaded file.
### 1. Data Submission
The **User** provided traffic source distribution and uploaded:
- `Unique visitors in last 14 days.csv`
- `Total views in last 14 days.csv`
- `star-history.csv`
### 2. Analysis Execution
**Minimax 2.1** received the data and immediately formulated an analysis plan:
1. Calculate star growth trajectory and rates.
2. Analyze visitor-to-star conversion rates.
3. Build linear and median projection models.
4. Generate a milestone timeline.
### 3. Report Generation
The model produced a comprehensive report. Here are the core projections:
#### 🎯 Key Projections
| Metric | Value | Insight |
| :--- | :--- | :--- |
| **Current Stars** | 62 | 62% of the goal reached |
| **Projected Goal Date** | **March 10, 2026** | ~28 days remaining |
| **Avg Growth Rate** | 1.35 stars/day | Highly stable and predictable |
| **Recent Acceleration** | 1.92 stars/day | Growth accelerated by 42% in last 14 days |
| **Conversion Rate** | 4.19% | Significantly higher than the OS average of 1-2% |
---
## 📈 Growth Milestone Timeline
```mermaid
gantt
title 🎯 Path to 100 Stars Timeline
dateFormat YYYY-MM-DD
axisFormat %m/%d
section Completed
Launch (0 Stars) :done, 2025-12-26, 1d
Hit 50 Stars :done, 2026-02-01, 1d
section Projected
75 Stars (Proj) :active, 2026-02-19, 5d
80 Stars (Proj) : 2026-02-23, 4d
90 Stars (Proj) : 2026-03-02, 4d
🎯 100 Stars Reach :crit, 2026-03-10, 4d
```
---
## 💡 Strategic Recommendations
1. **Strengthen OpenWebUI Partnership**: 41% of traffic comes from `openwebui.com`. Maintain high visibility on this channel.
2. **SEO Optimization**: Organic search accounts for only 6%. There is massive potential for keyword optimization in the README.
3. **Milestone Momentum**: Plan a social media push around Feb 23 (at the 80-star mark) to leverage the 42% acceleration trend.
---
> [View GitHub Copilot SDK Pipe Source Code](../../../plugins/pipes/github-copilot-sdk/README.md)

View File

@@ -0,0 +1,91 @@
# 案例展示GitHub 100 Star 增长预测分析
本案例展示了如何使用 **GitHub Copilot SDK Pipe** 配合 **Minimax 2.1** 模型,对项目的增长数据进行深度分析并预测达到 100 Star 的里程碑时间。
---
## 🎥 效果录屏
![分析过程演示](./star-prediction-demo.gif)
> **场景描述**:用户上传了过去 14 天的项目访问流量 CSV 和 Star 历史数据。模型自动编写 Python 脚本进行回归分析,生成了可视化看板和详细的增长预测报告。
---
## 🛠️ 技术实现
- **插件类型**: Pipe (GitHub Copilot SDK)
- **底层模型**: Minimax 2.1 (通过 Pipe 接入)
- **核心能力**:
- **文件处理**: 自动读取并解析多份 CSV 数据文件。
- **代码生成与执行**: 现场编写 Python 分析代码并执行,计算增长率、转化率及中位趋势。
- **多模态输出**: 生成 Markdown 报告、HTML 交互看板以及 Mermaid 时间轴图表。
---
## 💬 对话实录
### 📥 导入对话记录
你可以下载原始对话数据并导入到你的 Open WebUI 中,查看完整的工具调用和分析逻辑:
[:material-download: 下载原始对话 JSON](./star-prediction-chat.json)
> **如何导入?**
> 在 Open WebUI 首页点击 **左侧侧边栏底部个人头像** -> **设置** -> **数据** -> **导入记录**,选择下载的文件即可。
### 1. 提交原始数据
**用户**提供了项目的流量来源分布表,并上传了:
- `Unique visitors in last 14 days.csv`
- `Total views in last 14 days.csv`
- `star-history.csv`
### 2. 模型执行分析
**Minimax 2.1** 接收到数据后,立即制定了分析计划:
1. 计算 Star 增长轨迹和增长率。
2. 分析访问者到 Star 的转化率。
3. 构建线性与中位增长模型进行预测。
4. 生成里程碑时间轴。
### 3. 生成分析报告
模型输出了一份详尽的报告,以下是其核心预测:
#### 🎯 关键预测结果
| 指标 | 数值 | 洞察 |
| :--- | :--- | :--- |
| **当前 Star 数** | 62 | 已完成目标的 62% |
| **预测达成日期** | **2026年3月10日** | 预计还有 28 天 |
| **平均增长率** | 1.35 stars/day | 极其稳定且可预测 |
| **近期加速** | 1.92 stars/day | 过去 14 天增长加速了 42% |
| **Star 转化率** | 4.19% | 远高于开源项目 1-2% 的平均水平 |
---
## 📈 增长里程碑预演
```mermaid
gantt
title 🎯 冲刺 100 Stars 路径图
dateFormat YYYY-MM-DD
axisFormat %m/%d
section 已完成
项目启动 (0 Star) :done, 2025-12-26, 1d
突破 50 Star :done, 2026-02-01, 1d
section 预测中
75 Stars (预测) :active, 2026-02-19, 5d
80 Stars (预测) : 2026-02-23, 4d
90 Stars (预测) : 2026-03-02, 4d
🎯 100 Stars 达成 :crit, 2026-03-10, 4d
```
---
## 💡 模型给出的建议
1. **强化 OpenWebUI 社区合作**41% 的流量来自 `openwebui.com`,应持续在该渠道保持活跃。
2. **SEO 优化**:目前搜索流入仅占 6%Readme 的关键词优化空间巨大。
3. **关键节点冲刺**:建议在 2 月 23 日80 Star 节点)发起社交媒体宣传,利用近期 42% 的加速趋势冲刺百星。
---
> [查看 GitHub Copilot SDK Pipe 源码](../../../plugins/pipes/github-copilot-sdk/README.md)

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

View File

@@ -0,0 +1,73 @@
# Case Study: High-Quality Video to GIF Conversion
This case study demonstrates how to use the **GitHub Copilot SDK Pipe** with **Minimax 2.1** to perform professional-grade video processing: accelerating a video by 1.4x and converting it into a high-quality GIF under 20MB.
---
## 🎥 Recording
![Video Processing Demo](./video-processing-demo.gif)
> **Scenario**: The user uploaded a 38MB `.mov` recording and requested a 1.4x speed increase, 1280px width, and a file size limit of 20MB. The model automatically formulated, executed, and verified a two-pass FFmpeg workflow.
---
## 🛠️ Implementation
- **Plugin Type**: Pipe (GitHub Copilot SDK)
- **Base Model**: Minimax 2.1
- **Key Capabilities**:
- **System Tool Access**: Automatically detects and invokes `ffmpeg` within the container.
- **Two-Pass Optimization**:
1. **Pass 1**: Analyzes all frames to generate a custom 256-color palette (`palettegen`).
2. **Pass 2**: Applies the palette for superior quantization and dithering (`paletteuse`).
- **Precision Parameters**: Implements 1.4x PTS scaling, Lanczos scaling, and 20fps rate control.
---
## 💬 Conversation Highlights
### 📥 Import Conversation
You can download the raw chat data and import it into your Open WebUI to see how the model debugs and optimizes the FFmpeg parameters:
[:material-download: Download Chat JSON](./video-processing-chat.json)
> **How to Import?**
> In Open WebUI, click your **User Avatar** (bottom of left sidebar) -> **Settings** -> **Data** -> **Import Chats**, then select the downloaded file.
### 1. Processing Requirements
The **User** provided an input file and specific parameters:
- Speed: 1.4x (setpts=PTS/1.4)
- Resolution: 1280px width, auto height
- Optimization: Must use palette generation technology
- Constraint: File size < 20MB
### 2. Analysis Execution
**Minimax 2.1** generated and executed the following core logic:
```bash
# Pass 1: Generate optimal palette
ffmpeg -i input.mov -vf "fps=20,scale=1280:-1:flags=lanczos,setpts=PTS/1.4,palettegen" palette.png
# Pass 2: Generate final high-quality GIF
ffmpeg -i input.mov -i palette.png -lavfi "[0:v]fps=20,scale=1280:-1:flags=lanczos,setpts=PTS/1.4[v];[v][1:v]paletteuse" output.gif
```
### 3. Result Summary
| Metric | Original Video | Processed GIF | Status |
| :--- | :--- | :--- | :--- |
| **File Size** | 38 MB | **14 MB** | ✅ Success |
| **Resolution** | 3024x1898 | 1280x803 | ✅ Smooth |
| **Speed** | 1.0x | 1.4x | ✅ Accurate |
| **Color Quality** | N/A | Optimal 256-color | ✨ Crystal Clear |
---
## 💡 Why This Case Matters
Standard LLMs can only "tell you" how to use FFmpeg. However, a Pipe powered by the **GitHub Copilot SDK** can:
1. **Interpret** complex multimedia processing parameters.
2. **Access** raw files within the filesystem.
3. **Execute** resource-intensive binary tool tasks.
4. **Validate** that the output (size, resolution) meets the user's hard constraints.
---
> [View GitHub Copilot SDK Pipe Source Code](../../../plugins/pipes/github-copilot-sdk/README.md)

View File

@@ -0,0 +1,73 @@
# 案例展示:视频高质量 GIF 转换与加速处理
本案例展示了如何使用 **GitHub Copilot SDK Pipe** 配合 **Minimax 2.1** 模型通过底层工具FFmpeg对视频文件进行精细化处理加速 1.4 倍并压缩至 20MB 以内的超高质量 GIF。
---
## 🎥 效果录屏
![视频处理过程演示](./video-processing-demo.gif)
> **场景描述**:用户上传了一个 38MB 的 `.mov` 录屏文件,要求加速 1.4 倍,并转换为 1280px 宽度、大小在 20MB 以内的高质量 GIF。模型自动分析了需求编写并执行了双工作流 FFmpeg 指令。
---
## 🛠️ 技术实现
- **插件类型**: Pipe (GitHub Copilot SDK)
- **底层模型**: Minimax 2.1
- **核心能力**:
- **底层系统访问**: 自动检测并调用容器内的 `ffmpeg` 工具。
- **双阶段优化 (Two-Pass Optimization)**:
1. **阶段一**: 分析全视频帧生成 256 色最优调色板 (`palettegen`)。
2. **阶段二**: 应用调色板进行高质量量化和抖动处理 (`paletteuse`)。
- **参数精准控制**: 实现 1.4 倍 PTS 缩放、Lanczos 滤镜缩放及 20fps 帧率控制。
---
## 💬 对话实录
### 📥 导入对话记录
你可以下载原始对话数据并导入到你的 Open WebUI 中,查看模型如何一步步调试 FFmpeg 参数:
[:material-download: 下载原始对话 JSON](./video-processing-chat.json)
> **如何导入?**
> 在 Open WebUI 首页点击 **左侧侧边栏底部个人头像** -> **设置** -> **数据** -> **导入记录**,选择下载的文件即可。
### 1. 提交处理需求
**用户**指定了输入文件和详细参数:
- 加速1.4x (setpts=PTS/1.4)
- 分辨率:宽度 1280px等比例缩放
- 质量优化:必须使用调色板生成技术
- 约束:文件体积 < 20MB
### 2. 模型执行处理
**Minimax 2.1** 自动编写并执行了以下核心逻辑:
```bash
# 生成优化调色板
ffmpeg -i input.mov -vf "fps=20,scale=1280:-1:flags=lanczos,setpts=PTS/1.4,palettegen" palette.png
# 生成最终高质量 GIF
ffmpeg -i input.mov -i palette.png -lavfi "[0:v]fps=20,scale=1280:-1:flags=lanczos,setpts=PTS/1.4[v];[v][1:v]paletteuse" output.gif
```
### 3. 处理结果摘要
| 指标 | 原始视频 | 处理后 GIF | 状态 |
| :--- | :--- | :--- | :--- |
| **文件大小** | 38 MB | **14 MB** | ✅ 达标 |
| **分辨率** | 3024x1898 | 1280x803 | ✅ 缩放平滑 |
| **播放速度** | 1.0x | 1.4x | ✅ 节奏紧凑 |
| **色彩质量** | N/A | 256色最优量化 | ✨ 极其清晰 |
---
## 💡 为什么这个案例很有意义?
传统的 LLM 只能“告诉你”怎么做,而基于 **GitHub Copilot SDK** 的 Pipe 能够:
1. **理解** 复杂的多媒体处理参数。
2. **感知** 文件系统中的原始素材。
3. **执行** 耗时、耗能的二进制工具任务。
4. **验证** 产出物(体积、分辨率)是否符合用户的最终约束。
---
> [查看 GitHub Copilot SDK Pipe 源码](../../../plugins/pipes/github-copilot-sdk/README.md)