CaseyTso/analyze_image_tool

CaseyTso★ 0JavaScript最后同步: 2026-08-14

在 GitHub 打开

README 摘要

analyze-image-tool 给纯文本的 DeepSeek Harness 模型加上「眼睛」:注册一个 analyze image 工具,把图片和问题转发给 任意 OpenAI 兼容的视觉/多模态端点 ,把答案以文本返回。装上之后,即使主模型本身不支持图片输入,所有 dsh 入口(web、TUI、远程通道)也能识图。 Vision bridge for text-only DeepSeek Harness models: registers an analyze image tool that answers questions about images via any OpenAI-compatible vision/multimodal endpoint . No vendor is hard-coded — bring your own baseURL + apiKey + model . 特性 - 通用端点 :一套配置( baseURL + apiKey + model )覆盖任意 OpenAI 兼容端点 —— SiliconFlow、DashScope compatible-mode、智谱、OpenRouter、火山、Ollama 本地、OpenAI……代码里零供应商逻辑。 - 沙箱安全读取 :本地图片优先走宿主提供的沙箱 fs 通道( ctx.fs.readBytes ),遵守会话路径策略;没有该通道的宿主自动回退到 Node 原生读取。也支持 http(s) URL 和 data: URL。 - Schema 安全 :工具参数经 defineTool 编译为 object 根( type: "object" )的标准 JSON Schema,规避了社区踩过的「工具 schema 根不是 object 导致整个会话 400 崩溃」的坑(dsh 社区 297)。 - 健壮性 :API key 在报错信息中自动脱敏;思考型模型的 推理块自动剥离; 独占响应当作「仅推理无答案」处理并给出可操作提示。 - 结构化返回 : { text, model, usage } ,附带端点的模型 id 与 token 用量。 - 多插件共存 :工具名 analyze image 与社区的 view image / see image / vision glance 等不冲突,可与 dsh-image-bridge 之类的粘贴桥接补丁搭配使用。 安装 要求:DeepSeek Harness( dsh )0.1.x,Node.js ≥ 18.17。 包内 package.json 声明了 dsh.bundle.patch ,安装后会自动作为 profile 层生效,无需手工编辑 cordis.patch.yml 。 配置 在 profile 的 cordis.p…

在 GitHub 查看完整 README →
Media / Contentdeepseek-harnessdsh-pluginmultimodalopenai-compatiblevisionvlmtui

分类