mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-09 07:18:29 -05:00
refac
This commit is contained in:
@@ -641,7 +641,10 @@ async def image_generations(
|
||||
|
||||
for image in res["data"]:
|
||||
if image_url := image.get("url", None):
|
||||
image_data, content_type = get_image_data(image_url, headers)
|
||||
image_data, content_type = get_image_data(
|
||||
image_url,
|
||||
{k: v for k, v in headers.items() if k != "Content-Type"},
|
||||
)
|
||||
else:
|
||||
image_data, content_type = get_image_data(image["b64_json"])
|
||||
|
||||
@@ -993,7 +996,10 @@ async def image_edits(
|
||||
images = []
|
||||
for image in res["data"]:
|
||||
if image_url := image.get("url", None):
|
||||
image_data, content_type = get_image_data(image_url, headers)
|
||||
image_data, content_type = get_image_data(
|
||||
image_url,
|
||||
{k: v for k, v in headers.items() if k != "Content-Type"},
|
||||
)
|
||||
else:
|
||||
image_data, content_type = get_image_data(image["b64_json"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user