Xieweikang123/dsh-vision-bridge ↗★ 1
dsh-vision-bridge
Give a text-only dsh model eyes: pasted images are recognized into text via an OpenAI-compatible vision endpoint (Zhipu free by default) before the message reaches the model. 适合用纯文本模型但需识别图片的用户,需配置视觉 API。
Other repositories with this package name
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 ↗配置识别用的 API key
默认走智谱免费档 glm-4.6v-flash,只需一个 key:
- 到 注册并创建 API key。
- 把 key 写进
~/.dsh/.env:VISION_API_KEY=
key 读取顺序:config.apiKey → $VISION_API_KEY → $DSH_VISION_API_KEY → $ZHIPUAI_API_KEY → $DASHSCOPE_API_KEY。本地 Ollama 端点可免 key。
重启 dsh 后生效:粘贴一张图,发送,模型就能看懂它。
配置
插件支持以下 config 项(在 cordis.patch.yml 的对应条目加 config: 即可):
- insert:
- id: dsh-vision-bridge
name: 'file:///D:/project/dsh-vision-bridge/lib/index.js'
config:
baseURL: https://open.bigmodel.cn/api/paas/v4 # OpenAI 兼容端点
apiKey: "" # 留空则读环境变量
model: glm-4.6v-flash # 视觉模型
fallbackModels: [] # 自定义降级链;空则默认智谱免费链
prompt: "" # 自定义识别提示词
maxTokens: 2048
timeoutMs: 60000
后端速查
| 场景 | baseURL | model |
|---|---|---|
| 默认(智谱免费) | https://open.bigmodel.cn/api/paas/v4 | glm-4.6v-flash |
| 智谱付费 | 同上 | glm-4.6v |
| 阿里百炼 | https://dashscope.aliyuncs.com/compatible-mode/v1 | qwen3-vl-flash |
| 火山豆包 | https://ark.cn-beijing.volces.com/api/v3 | doubao-seed-2-1-turbo-260628 |
| 本地 Ollama | http://localhost:11434/v1 | qwen3-vl:4b(无需 key) |