dsh-image-to-text
DSH plugin that lets text-only (non-multimodal) models send and read images: bypasses the image admission gate, rewrites image blocks to local paths, and OCRs/describes them via configurable vision API providers (image_to_text tool). 适合使用无多模态能力的纯文本模型但仍需处理图片输入的用户。
Install
This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗
README
Read the full README ↗Configuration
Plugin row config fields:
| Field | Default | Meaning |
|---|---|---|
pythonPath | Windows probes C:\Program Files\Python313\python.exe, else python | Python executable path or PATH command |
providers | built-in 7 provider templates | Override by name (optionally model), or add new providers |
bypassImageGate | true | Wrap llm.resolveModelInfo to admit image prompts |
rewriteImageBlocks | true | Rewrite image blocks to local paths before text-only adapters |
Custom API URL / key (plugin config)
- insert:
- id: image-to-text
name: 'dsh-image-to-text'
config:
pythonPath: 'python'
providers:
# Override a built-in provider: only name (and optionally model) is needed
- name: zhipu
apiKey: 'your-zhipu-key'
endpoint: 'https://open.bigmodel.cn/api/paas/v4/chat/completions'
# Add a fully custom OpenAI-compatible provider
- name: my-vision
model: 'vision-model'
apiKey: 'sk-xxx'
endpoint: 'https://api.example.com/v1/chat/completions'
format: openai
priority: 1
Built-in provider names: zhipu, gemini (shared by several Gemini models), grok. New providers need the full name/model/apiKey/endpoint/format/priority.
Custom API URL / key (environment variables)
Named by provider name (non-alphanumeric → _, uppercase):
IMAGE_TO_TEXT_API_KEY_ZHIPU=your-key
IMAGE_TO_TEXT_ENDPOINT_ZHIPU=https://open.bigmodel.cn/api/paas/v4/chat/completions
Environment variables are read on every call and never written to disk.
Usage
Upload an image in a session, or the model sees an image in context and calls image_to_text:
{
"images": ["C:\\path\\to\\image.png"]
}
Optional arguments: model (force a specific model), prompt (custom prompt). Returns:
{
"text": "OCR and description",
"provider": "gemini",
"model": "gemini-3.6-flash"
}