← 返回列表
D

@maxwell-feng/dsh-tesseract-ocr

v0.2.3 · 0 天前发布

dsh plugin: recognize attached images locally with Tesseract OCR and send only the recognized text to the model. Text models never receive image bytes; vision passthrough is opt-in.

dshdsh-plugindeepseek-harnessocrtesseractprivacy

README

tesseract-ocr

![Awesome DSH Plugin](https://awesome-dsh-plugin.com)

一个 DeepSeek Harness(dsh)插件:让纯文本模型也能"看"附件图片——图片在本机Tesseract OCR 识别,只有识别出的文字会发给模型 API。

隐私默认: 图片在本地 OCR,不把原图发给服务商。只有在你明确需要时,才把 passthrough 设为 true,让真正的视觉模型接收原图。

主要目标平台 Ubuntu(已测试);只要装了 tesseract CLI 就能用(Linux / macOS / Windows)。已在 dsh 0.1.0-rc.7 上验证。

  • 不需要改任何模型配置——不用在 settings.yaml 里给模型加 input: [text, image]

  • 对 dsh 里的任何 provider/模型通用;默认所有附件图片都会先 OCR 再出站。

  • 视觉模型透传是显式开启passthrough: true)。

  • 默认安全(fail-closed):插件没加载时,模型保持纯文本,图片附件会被拒绝——不存在静默泄漏。缺失附件会被替换成拒绝文本,不会留下原始 image 块。
  • 不要与 windows-ocr 插件同时启用:两者会对同一张图各跑一次 OCR。每台机器二选一。

    npm 安装

    ```bash

    查看完整 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
    @maxwell-feng/dsh-tesseract-ocr
    Repo
    git+https://github.com/maxwell-feng/dsh-tesseract-ocr.git
    Engines
    {"node":">=20"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"}}