← 返回列表
D

dsh-tool-image-gen

v0.1.0 · 1 天前发布

DSH tool plugin: generate images through ToAPIs async GPT-Image-2 API (submit task, poll, download).

dshdsh-plugindeepseek-harnessimage-generationgpt-image-2toapis

README

dsh-tool-image-gen

一个 DeepSeek Harness 图像生成工具插件:对接 ToAPIs 异步图像 API(GPT-Image-2 等),提供两个模型可调用工具:

  • image_gen:文生图 / 图生图。提交任务 → 轮询 → 下载到工作区 generated/,返回本地路径 + 公开 URL。

  • image_upload:把本地图片上传到 ToAPIs,换取公开 URL(可作 image_gen 的参考图)。
  • 特性

  • 异步任务管理POST /v1/images/generations 建任务,轮询 GET /v1/images/generations/{id} 取结果。

  • 本地参考图自动上传image_genreferenceImages 直接接受本地文件路径(自动走上传接口换 URL),也接受公开 URL。

  • 内联预览:结果注册进 DSH 附件系统(超 5MB 自动用 sips 压缩 JPEG),并在文本里附带 Markdown 图片链接。

  • 凭据:key 从环境变量或 ~/.dsh/.credentials.yaml 读取(TOAPIS_API_KEY),永不进对话。

  • 尺寸 1:1/3:2/2:3/4:3/3:4/5:4/4:5/16:9/9:16/2:1/1:2/21:9/9:21,分辨率 1k/2k/4kn 张数。
  • 安装

    ```bash

    1. 装进 profile


    cd ~/.dsh/profiles
    npm install dsh-t

    查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    dsh-tool-image-gen
    Repo
    git+https://github.com/zhangjunjesse/dsh-tool-image-gen.git
    Engines
    {}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"}}