summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/needs_auth
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-19 20:26:00 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-19 20:26:00 +0100
commit1fe59623b22790dc2db36f106112795859bc6a25 (patch)
tree261867c0894205b5de213fc5816d6f405ea8759a /g4f/Provider/needs_auth
parentFix aliases to gui arguments (diff)
downloadgpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.gz
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.bz2
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.lz
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.xz
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.tar.zst
gpt4free-1fe59623b22790dc2db36f106112795859bc6a25.zip
Diffstat (limited to 'g4f/Provider/needs_auth')
-rw-r--r--g4f/Provider/needs_auth/DeepInfraImage.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/Provider/needs_auth/DeepInfraImage.py b/g4f/Provider/needs_auth/DeepInfraImage.py
index 2310c1c8..24df04e3 100644
--- a/g4f/Provider/needs_auth/DeepInfraImage.py
+++ b/g4f/Provider/needs_auth/DeepInfraImage.py
@@ -73,7 +73,7 @@ class DeepInfraImage(AsyncGeneratorProvider, ProviderModelMixin):
async with session.post(f"{api_base.rstrip('/')}/{model}", json=data) as response:
await raise_for_status(response)
data = await response.json()
- images = data["output"] if "output" in data else data["images"]
+ images = data.get("output", data.get("images"))
if not images:
raise RuntimeError(f"Response: {data}")
images = images[0] if len(images) == 1 else images