DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-plugin-use-images

c

dsh-plugin-use-images

Manifest valid

You can use the image API in dsh

UI (client)hasBundlePatch

dsh-plugin-use-images

把生成图片的 HTTP API 适配成 DeepSeek Harness (dsh) 可选模型。用户在聊天框选中图片模型后,最后一条用户文本会作为 prompt 发送给图片 API;响应会被转换为 DSH 原生图片块,持久化到会话附件存储中。

支持的响应

  • JSON URL,如 data[*].url
  • JSON base64,如 data[*].b64_json
  • JSON data URL
  • text/plain 的 URL 或 data URL
  • HTTP 直接返回 image/png / image/jpeg / image/webp / image/gif

请求 body 是可配置的 JSON 模板,可用 {{prompt}}、{{model}}、{{n}} 和 {{apiKey}}。响应字段使用简化路径,例如 data[*].url、output.images[*]。

在设置页添加 API

安装并重启 DSH 后,打开「设置 → 图片 / 视频 API」。点击「新增 API」并选择接口预设,填写 Base URL、API Key 和模型 ID 即可。高级接口还可在同一页调整请求 JSON、Headers 和响应提取路径。

页面内可以直接新增、编辑和删除接口,保存后 DSH 模型列表会热更新,无需手工编辑 settings.yaml。

安装

# 从 GitHub 直接安装(推荐)
dsh plugin --profile web add github:chuling-lingling/dsh-plugin-use-images

# 卸载
dsh plugin --profile web remove dsh-plugin-use-images

安装后重启 dsh web 即可生效。完整的接口配置见 EXAMPLE.md。

YAML 备用配置方式

通常不需要手工改 YAML。如果 Web 设置页不可用,仍可用 inbox 导入:

use-images:
  inbox: |-
    {"把 EXAMPLE.md 中的 JSON 粘贴到这里": true}

如果解析失败,错误会保留在 use-images.lastError。已生效的路由保存在 use-images.routes,修改设置后会热更新模型列表。

关键字段

字段用途
idDSH 供应商 id,只能用小写字母、数字和 -
models在聊天模型选择器中显示的模型
request发送给生图 API 的 JSON 模板
extractUrls从 JSON 响应提取 URL 的路径
extractB64从 JSON 响应提取 base64 的路径
responseModeauto、json 或 binary
maxResponseBytes单张下载图片上限,默认 20 MiB
timeoutMs生成及下载的总超时,默认 120 秒

设计说明

DSH 的 LLM runtime 只接收统一的流事件,而图片 API 通常是一次性 JSON 或二进制响应。本插件实现自定义 LlmAdapter:先执行图片 HTTP 请求,再把结果存入 attachments,最后发出 block-start(image) / block-end(image) / finish 事件。因此不需要修改 DSH 的文本适配器。

Comments

Loading…

Similar plugins

dsh-imagegen

by dong2007-png

DSH plugin: generate images via a New API relay (tools: generate_image, list_image_models)

Manifest valid

★ 0

MIT

JavaScript

Oct 1, 2026

dsh plugin --profile web add dsh-imagegen

by dsh-plugins

DeepSeek Harness Web plugin: native image previews plus persistent non-image file-drop attachment cards

Terminal & ClientsManifest valid

★ 0

GPL-3.0

JavaScript

Sep 11, 2026

dsh plugin --profile web add dsh-file-drop-attachments-persisted

by Jack-sun-learner

DeepSeek Harness 文生图插件:基于 MiniMax image-01 生成图片,注册 image-gen 工具

Manifest valid

★ 0

MIT

JavaScript

Aug 19, 2026

dsh plugin --profile web add dsh-minimax-image

by xuan25

Image-generation plugin for dsh: one `imagegen` tool that renders images through any OpenAI-compatible image backend

Manifest valid

★ 0

NOASSERTION

TypeScript

Oct 13, 2026

dsh plugin --profile web add dsh-imagegen

by uckkk

人像拍摄

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Aug 20, 2026

dsh plugin --profile web add dsh-portrait

by uckkk

图表类型选择参考

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Aug 19, 2026

dsh plugin --profile web add dsh-data-visualization