mirror of
https://github.com/open-webui/open-webui
synced 2025-06-15 10:51:13 +00:00
fix: image generation
This commit is contained in:
parent
5c74e56bd0
commit
efb54aa2e4
@ -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})
|
||||||
|
Loading…
Reference in New Issue
Block a user