Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building agents, you often encounter scenarios that require extracting text from images, such as parsing documents, recognizing billboard information, or extracting content from screenshots. The xby-ocr plugin is designed to address this type of visual understanding requirement.

Plugin Overview

xby-ocr is a DSH plugin maintained by xby-skill. It provides OCR text recognition functionality, focusing on balancing speed and accuracy. It can process various text-containing images and is suitable for scenarios such as documents, billboards, and screenshots.

Core Features

The plugin mainly includes the following features:

  1. set_xby_apikey
    Set the API key in the chat. This operation is automatically persisted and remains valid after restarting DSH.

  2. ocr
    Input an image file URL to perform text recognition.

  3. ocr_for_data_base64
    Input the BASE64-encoded data of an image file to perform text recognition.

  4. ocr_for_data_file
    Input the file path of an image file to perform text recognition.

Installation and Enablement

Run the following command in the terminal to complete the installation. It is recommended to install from the official repository.

dsh plugin --profile web add github:xby_skill/xby-ocr

After installation is complete, the plugin is loaded into the DSH environment.

Configuration and Usage

Get the API Key

Before using the OCR functionality, you need to register and obtain an API key from the XiaoBenYang official website.

Set the Key

In the DSH chat interface, use the set_xby_apikey command to set the API key you obtained. For example:

set_xby_apikey your_api_key_here

Recognize Images

Depending on how your image is stored, call the corresponding function:

  • Image file URL: Use the ocr command and input the URL of the image.
    ocr https://example.com/document.png
  • Image BASE64 encoding: Use the ocr_for_data_base64 command and paste the BASE64 string of the image directly.
  • Local file path: Use the ocr_for_data_file command and input the absolute path of the image in the system.

Notes

  1. Input Requirements: The three functions ocr, ocr_for_data_base64, and ocr_for_data_file all require image data to be provided.
  2. Source Code Review: Before installing a community plugin, it is recommended to review its source code and license (MIT).
  3. Information Sources: The plugin catalog address is https://www.skillhub.cn/plugins/xby-skill/xby-ocr, and the GitHub repository address is https://github.com/xby_skill/xby-ocr.

Conclusion

By providing multiple input methods (URL, Base64, and file path), xby-ocr simplifies the process of integrating OCR capabilities into DSH. If you need to process visual information, you can directly refer to the catalog or the GitHub repository above.