|
@@ -517,9 +517,9 @@ async def image_generations(
|
|
images = []
|
|
images = []
|
|
|
|
|
|
for image in res["data"]:
|
|
for image in res["data"]:
|
|
- if "url" in image:
|
|
|
|
|
|
+ if image_url := image.get("url",None):
|
|
image_data, content_type = load_url_image_data(
|
|
image_data, content_type = load_url_image_data(
|
|
- image["url"], headers
|
|
|
|
|
|
+ image_url, headers
|
|
)
|
|
)
|
|
else:
|
|
else:
|
|
image_data, content_type = load_b64_image_data(image["b64_json"])
|
|
image_data, content_type = load_b64_image_data(image["b64_json"])
|