package vision import ( "github.com/yaoapp/yao/agent/context" ) // PreprocessVisionMessages preprocess messages to handle vision content // Removes or converts vision content for models that don't support it func PreprocessVisionMessages(messages []context.Message, supportsVision bool) []context.Message { // TODO: Implement vision message preprocessing // If supportsVision is false: // - Remove image_url content parts // - Convert to text-only messages // - Optionally add image descriptions from vision API // If supportsVision is true: // - Validate image URLs // - Ensure proper format return messages } // ConvertImageToText convert image content to text description // Used when model doesn't support vision func ConvertImageToText(imageURL string) (string, error) { // TODO: Implement image to text conversion // - Call vision API (if configured) // - Generate description // - Return as text content return "", nil } // ValidateImageURL validate image URL format func ValidateImageURL(imageURL string) error { // TODO: Implement image URL validation // - Check URL format // - Validate image type // - Check accessibility return nil } // ExtractImagesFromMessages extract all image URLs from messages func ExtractImagesFromMessages(messages []context.Message) []string { // TODO: Implement image extraction // - Iterate through messages // - Find ContentPart with type="image_url" // - Collect all image URLs return nil }