mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
Merge pull request #11515 from davizucon/main
fix: url value when response contains url tag
This commit is contained in:
commit
6399aaf4b2
1 changed files with 2 additions and 4 deletions
|
|
@ -517,10 +517,8 @@ 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"])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue