ImageContent 图片内容
| 11 | |
| 12 | // ImageContent 图片内容 |
| 13 | type ImageContent struct { |
| 14 | // Type 图片来源类型: "url", "base64" |
| 15 | Type string `json:"type"` |
| 16 | |
| 17 | // Source 图片源 |
| 18 | // - 当 Type="url" 时,Source 是图片 URL |
| 19 | // - 当 Type="base64" 时,Source 是 base64 编码的图片数据 |
| 20 | Source string `json:"source"` |
| 21 | |
| 22 | // MimeType MIME 类型,如 "image/jpeg", "image/png" |
| 23 | MimeType string `json:"mime_type,omitempty"` |
| 24 | |
| 25 | // Detail 图片细节级别 (OpenAI) |
| 26 | // - "low": 低分辨率快速处理 |
| 27 | // - "high": 高分辨率详细分析 |
| 28 | // - "auto": 自动选择 |
| 29 | Detail string `json:"detail,omitempty"` |
| 30 | } |
| 31 | |
| 32 | func (i *ImageContent) IsContentBlock() {} |
| 33 |
nothing calls this directly
no outgoing calls
no test coverage detected