In the DeepSeek Harness (DSH) plugin ecosystem, handling captchas is a common requirement in agent development. Manually recognizing captchas is inefficient and error-prone. The xby-ocr-captcha plugin aims to solve this problem by calling an OCR model to convert an input captcha image into readable text content.
This is a model inference plugin maintained by xby-skill. It follows the MIT license and provides three different input interfaces for image links, BASE64-encoded data, and local file paths.
Installation¶
Installing the plugin requires DSH’s command-line tool.
dsh plugin --profile web add github:xby_skill/xby-ocr-captcha
Before installation, confirm that the source code and license meet your project requirements.
Usage Process¶
Before using the plugin, you must obtain and configure an API key.
- Visit Xiaobenyang’s official website to register an account and obtain an API key.
- Set the key in a DSH chat or command line. The key is automatically persisted and remains valid after a process restart.
set_xby_apikey <你的API密钥>
Function Description¶
The plugin provides three core functions. Choose the corresponding interface based on how you obtain the captcha image:
-
ocr_captcha
Requires the link to an image file. The plugin reads the image from the link and returns the recognition result. -
ocr_captcha_for_data_base64
Requires the BASE64-encoded content of the image file. Suitable for scenarios where the image data has already been converted to a Base64 string. -
ocr_captcha_for_data_file
Requires the file path of the image file. Suitable for scenarios where the image has already been saved on local disk.
Summary¶
This plugin encapsulates captcha recognition with simple commands. Developers only need to configure the API key and can then directly invoke the recognition feature within their DSH workflow. For more details or to submit issues, visit the GitHub repository.