chenkezhen480/dsh-multimodal ↗★ 0
dsh-plugin-multimodal
Image recognition and image generation for DeepSeek Harness: model-facing tools that call any OpenAI-compatible external API (vision chat/completions and images/generations), with no built-in model defaults — a tool without a configured model fails with a clear error.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chenkezhen480/dsh-multimodal说明文档
阅读完整 README ↗dsh-plugin-multimodal
English | 中文
为 DeepSeek Harness 提供图像识别与图像生成能力的插件(dsh-plugin,即 Cordis 插件)(后续会拓展语音)。
工具:image_recognize、image_generate、vision_providers 三个模型工具,调用您在配置中声明的外部 API 模型(视觉 chat/completions;图像生成支持 OpenAI 兼容 images/generations 与阿里云百炼原生异步协议)。不内置、不默认任何模型 —— 未配置模型时工具调用会直接报错并提示如何配置,绝不猜测、绝不静默失败。
功能特性
image_recognize(识别图片) —— 传入图片(本地路径 / http(s) URL / data URI),调用配置的视觉模型(多模态 chat/completions)理解并返回文字结果:看图说话、OCR、识别图表截图、审核图片等- 本地图片自动转 base64 data URI 内联发送(上限 25 MiB)
- 支持
prompt(问什么)、max_tokens/temperature、按provider指定用哪个视觉模型
image_generate(生成图片) —— 传入提示词,调用配置的图像生成模型,把结果保存为文件并返回路径- 文生图:OpenAI 兼容
images/generations(优先 b64_json,端点不支持时自动重试下载 URL);或阿里云百炼原生异步任务协议(protocol: dashscope-native,提交 → 轮询 → 下载) - 图生图:传入
image参数(源图)即可在生成时以它为输入(编辑/变体/风格迁移)。OpenAI 兼容端点用image字段;DashScope 原生用base_image_url - 默认去水印:OpenAI 兼容端点请求体自动带
watermark: false(豆包 Seedream 等支持该参数;端点不认会自动去掉重试),provider 设watermark: true可恢复 - Web 对话内直接显示:内置静态图片服务(默认 127.0.0.1:3081)把生成图以绝对 http(s) URL 暴露,工具返回 Markdown
链接,模型放进回复正文即可在 Web GUI 直接看到图片(GUI 的 Markdown 渲染器只接受绝对 http(s) URL,本地路径/相对链接/Data URI 一律不渲染;DSH 自带 webserver 不服务任意文件,写入前端 dist 目录实测也不生效) - 扩展名按真实格式:base64 结果按文件魔数(PNG/JPEG/WebP/GIF)修正扩展名,Content-Type 与内容一致
- 支持
size(如 1024x1024)、n(1~4 张,多张自动加序号)、output_path(目录或文件路径)
- 文生图:OpenAI 兼容