vision_analyze
Analyze one or more images using a vision-capable model.
Accepts local file paths (absolute) or public URLs. Supports jpg, jpeg, png, gif, webp, bmp formats. Returns a detailed text description of image contents.
Examples:
- "What's in this photo?" -> { images: ["/path/to/photo.jpg"] }
- "Compare these two images" -> { images: ["img1.png", "img2.png"], prompt: "Compare these two images" }
- "Read the text in this image" -> { images: ["https://example.com/screenshot.png"], prompt: "Extract all text from this image" }
Args:
- images (string[]): Array of file paths or URLs (1-5 images)
- prompt (string): What to look for in the image(s), defaults to "用中文详细描述..."
- model (string, optional): Override the configured vision model
Returns: Detailed text description of the image(s).
Error Handling:
- "文件不存在: <path>" if a local file is not found
- "不支持的格式: .<ext>" for unsupported file types
- "API 请求失败: ..." if the upstream vision API fails