七牛云官方的 Dify 插件仓库,包含两个独立的插件:AI 模型插件和存储工具插件。
接入七牛云 AI 推理平台,支持多种主流大语言模型。
主要功能:
- 工具调用和智能体模式
- 流式响应
- 多工具并行调用
安装地址:
https://github.com/qiniu/dify-plugin
提供完整的七牛云对象存储管理功能。
主要功能:
- 列出存储空间
- 文件上传
- 文件列表查询(支持前缀过滤)
- 私有文件访问(签名链接)
安装地址:
https://github.com/qiniu/dify-plugin
在 Dify 工作空间中:
- 进入「插件」管理页面
- 点击「安装插件」
- 选择「从 GitHub 安装」
- 输入对应插件的安装地址(见上方)
- API Key:获取七牛云 API Key
- API Endpoint:默认
https://openai.qiniu.com/v1(可选)
dify-plugin/
├── ai-models-provider/ # AI 模型插件
│ ├── manifest.yaml
│ ├── main.py
│ ├── requirements.txt
│ ├── README.md
│ ├── models/llm/
│ └── provider/
│
├── storage-tools/ # 存储工具插件
│ ├── manifest.yaml
│ ├── main.py
│ ├── requirements.txt
│ ├── README.md
│ ├── tools/
│ └── provider/
│
├── LICENSE
└── README.md
# 克隆仓库
git clone https://github.com/qiniu/dify-plugin.git
cd dify-plugin
# 安装 AI 模型插件依赖
cd ai-models-provider
pip install -r requirements.txt
cd ..
# 安装存储工具插件依赖
cd storage-tools
pip install -r requirements.txt-
在 Dify 中获取远程调试地址和 Key
- 参考:Dify 插件调试文档
-
在对应插件目录创建
.env文件:INSTALL_METHOD=remote REMOTE_INSTALL_PORT=5003 REMOTE_INSTALL_URL=debug.dify.ai REMOTE_INSTALL_KEY=your-remote-key-here
-
启动插件:
python -m main
本仓库已配置 GitHub Actions 自动发布工作流,当你推送代码到 main 或 0.2.x 分支时,会自动:
- 打包插件为
.difypkg文件 - 推送到你 fork 的
dify-plugins仓库 - 自动创建 PR 到官方
langgenius/dify-plugins仓库
使用发布脚本(推荐):
# 交互式发布
./scripts/release.sh
# 指定插件和版本
./scripts/release.sh ai-models-provider 0.0.2
./scripts/release.sh storage-tools 0.0.2配置要求:
- 已 fork
langgenius/dify-plugins仓库 - 在本仓库设置
PLUGIN_ACTIONSecret(GitHub Personal Access Token) - 确保
manifest.yaml中的author和version字段正确
详细配置指南请查看:插件自动发布配置文档
- 🔄 重大更新:拆分为两个独立插件
- ✅ 符合 Dify 官方插件规范
- 📦 独立的 AI 模型插件和存储工具插件
- 🤖 新增自动发布 PR 到官方仓库功能
- 包含 AI 模型和存储工具的完整版本
我们欢迎社区贡献!
- 检查 Issues 是否已有相关问题
- 提供详细信息:问题描述、复现步骤、环境信息、错误日志
在 Issues 中创建功能建议,详细描述使用场景
- Fork 此仓库
- 创建功能分支:
git checkout -b feature/your-feature - 提交更改(遵循下方 Commit 规范)
- 推送分支:
git push origin feature/your-feature - 创建 Pull Request
使用语义化的 commit 消息格式:
<type>: <description>
[optional body]
Type 类型:
feat: 新增功能fix: 修复问题docs: 文档更新refactor: 代码重构(不影响功能)chore: 构建/工具链更新test: 测试相关style: 代码格式调整
示例:
feat: add interactive mode to release script
fix: remove tool-related logic from AI models plugin
docs: update README with repository info
refactor: split into two independent plugins
chore(ai-models-provider): release version 0.2.0- 问题反馈:GitHub Issues
- 功能建议:欢迎提交 Issue 或 Pull Request
- 官方文档:七牛云开发者中心
- 官方网站:https://www.qiniu.com
本项目基于 MIT License 开源。
Made with ❤️ by Qiniu Cloud