Files
chongming-plugins/doubao/README.md
T
2026-07-21 16:14:02 +08:00

39 lines
837 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Doubao Worker 插件
火山引擎豆包(Doubao)视觉理解模型集成,支持图像分析。
## 功能
- 接收 base64 编码的图片和提示词
- 调用火山引擎豆包视觉模型(支持思考模式)
- 返回模型描述结果
## 配置
在 `config/workers/doubao/config.toml` 中设置:
- `api_key`:火山引擎 API Key(也可通过环境变量 `VOLC_ACCESSKEY` 提供)
- `base_url`:API 端点(默认 `https://ark.cn-beijing.volces.com/api/v3`)
- `model`:模型名称(如 `doubao-seed-evolving`)
## 调用示例
```http
POST /api/v1/doubao/analyze
Content-Type: application/json
{
"image_base64": "data:image/png;base64,iVBORw0KG...",
"prompt": "描述这个图片的内容"
}
```
响应示例:
```json
{
"result": "图片中是一只猫坐在沙发上...",
"error": ""
}
```