package qwen // VLContent 视觉多模态内容结构,支持文本、图片和视频 type VLContent struct { Type string `json:"type"` // text, image_url, video_url Text string `json:"text,omitempty"` // type=text 时使用 ImageURL *ImageURL `json:"image_url,omitempty"` // type=image_url 时使用 VideoURL *VideoURL `json:"video_url,omitempty"` // type=video_url 时使用 FPS int `json:"fps,omitempty"` // type=video_url 时可选,视频帧率 } // VideoURL 视频URL结构 type VideoURL struct { URL string `json:"url"` } // VLRequest 视觉多模态请求结构 type VLRequest struct { Model string `json:"model"` // 模型名称,如 qwen3-vl-plus Messages []VLMessage `json:"messages"` // 消息列表 Seed int64 `json:"seed,omitempty"` // 随机种子 EnableSearch bool `json:"enable_search,omitempty"` // 是否启用搜索 } // VLMessage 视觉多模态消息结构 type VLMessage struct { Role string `json:"role"` // user, assistant, system Content []VLContent `json:"content"` // 内容列表,可包含文本、图片、视频 } // VLResponse 视觉多模态响应结构 type VLResponse struct { Choices []VLChoice `json:"choices"` Model string `json:"model,omitempty"` ID string `json:"id,omitempty"` } // VLChoice 视觉多模态选择结果 type VLChoice struct { Message struct { Content string `json:"content"` ReasoningContent string `json:"reasoning_content"` Role string `json:"role"` } `json:"message"` FinishReason string `json:"finish_reason"` Index int `json:"index,omitempty"` }