dsh-ocr-plugin
DeepSeek Harness OCR 插件 — 基于小笨羊 OCR 能力,为纯文本模型提供图片文字识别功能
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xby-skill/dsh-ocr-plugin说明文档
阅读完整 README ↗使用
插件加载后,在聊天中直接对话:
-
设置 API 密钥(只需首次):
"我的 OCR API 密钥是 xxxx"
Agent 会自动调用
set_ocr_api_key工具保存密钥,密钥持久化到$DSH_HOME/storages/xby-apikey.json。 -
识别图片文字:
"请识别这张图片中的文字: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 # 可选