fix transform_image_generation_response

This commit is contained in:
Ishaan Jaff 2025-07-29 17:08:44 -07:00
parent 51a140feb7
commit e938fa9e41

View file

@ -190,10 +190,9 @@ class GoogleImageGenConfig(BaseImageGenerationConfig):
predictions = response_data.get("predictions", [])
for prediction in predictions:
# Google AI returns base64 encoded images in the prediction
for image_data in prediction:
model_response.data.append(ImageObject(
b64_json=image_data.get("bytesBase64Encoded", None),
url=None, # Google AI returns base64, not URLs
))
model_response.data.append(ImageObject(
b64_json=prediction.get("bytesBase64Encoded", None),
url=None, # Google AI returns base64, not URLs
))
return model_response