xby-skill/dsh-ocr-plugin0

dsh-ocr-plugin

DeepSeek Harness OCR 插件 — 基于小笨羊 OCR 能力,为纯文本模型提供图片文字识别功能

AI Analysis

核心用途是为不支持多模态的纯文本模型扩展图片文字识别能力。适合需要让AI识别本地或网络图片中文字的用户,需配置小笨羊API密钥。

Package
dsh-ocr-plugin
Version
1.0.0
License
MIT
Last updated
Aug 26, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xby-skill/dsh-ocr-plugin

使用

插件加载后,在聊天中直接对话:

  1. 设置 API 密钥(只需首次):

    "我的 OCR API 密钥是 xxxx"

    Agent 会自动调用 set_ocr_api_key 工具保存密钥,密钥持久化到 $DSH_HOME/storages/xby-apikey.json

  2. 识别图片文字

    "请识别这张图片中的文字:https://example.com/screenshot.png"

    或识别本地文件:

    "请识别 /Users/xxx/Documents/receipt.png 中的文字"

配置

获取 API 密钥

前往 小笨羊官网 注册并获取 API 密钥。

配置方式(可选,推荐用聊天方式设置)

环境变量

export XBY_APIKEY=your_api_key_here

Profile 级配置cordis.patch.yml 中):

- insert:
    - id: dsh-ocr-plugin
      name: 'dsh-ocr-plugin'
      config:
        apiKey: your_api_key_here
        baseUrl: https://mcp.xiaobenyang.com   # 可选
        timeoutMs: 30000                        # 可选

配置方式(可选,推荐用聊天方式设置)

环境变量

export XBY_APIKEY=your_api_key_here

Profile 级配置cordis.patch.yml 中):

- insert:
    - id: dsh-ocr-plugin
      name: 'dsh-ocr-plugin'
      config:
        apiKey: your_api_key_here
        baseUrl: https://mcp.xiaobenyang.com   # 可选
        timeoutMs: 30000                        # 可选