fix: image generation

This commit is contained in:
Timothy Jaeryang Baek 2025-05-27 02:48:22 +04:00
parent 5c74e56bd0
commit efb54aa2e4

View File

@ -561,7 +561,7 @@ async def image_generations(
image_data, content_type = load_b64_image_data( image_data, content_type = load_b64_image_data(
image["bytesBase64Encoded"] image["bytesBase64Encoded"]
) )
url = upload_image(request, data, image_data, content_type, user) url = upload_image(request, image_data, content_type, data, user)
images.append({"url": url}) images.append({"url": url})
return images return images
@ -612,9 +612,9 @@ async def image_generations(
image_data, content_type = load_url_image_data(image["url"], headers) image_data, content_type = load_url_image_data(image["url"], headers)
url = upload_image( url = upload_image(
request, request,
form_data.model_dump(exclude_none=True),
image_data, image_data,
content_type, content_type,
form_data.model_dump(exclude_none=True),
user, user,
) )
images.append({"url": url}) images.append({"url": url})
@ -665,9 +665,9 @@ async def image_generations(
image_data, content_type = load_b64_image_data(image) image_data, content_type = load_b64_image_data(image)
url = upload_image( url = upload_image(
request, request,
{**data, "info": res["info"]},
image_data, image_data,
content_type, content_type,
{**data, "info": res["info"]},
user, user,
) )
images.append({"url": url}) images.append({"url": url})