summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-04-11 03:52:37 +0200
committerGitHub <noreply@github.com>2024-04-11 03:52:37 +0200
commitdeb3898e7a68c1e5131b943ac687ca90a41c2d72 (patch)
tree700209144462af712fb324d14dfc90db8de6d1d1
parentMerge pull request #1820 from hlohaus/bugfix (diff)
downloadgpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.tar
gpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.tar.gz
gpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.tar.bz2
gpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.tar.lz
gpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.tar.xz
gpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.tar.zst
gpt4free-deb3898e7a68c1e5131b943ac687ca90a41c2d72.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/DeepInfraImage.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/Provider/DeepInfraImage.py b/g4f/Provider/DeepInfraImage.py
index 6099b793..ce09533b 100644
--- a/g4f/Provider/DeepInfraImage.py
+++ b/g4f/Provider/DeepInfraImage.py
@@ -70,5 +70,7 @@ class DeepInfraImage(AsyncGeneratorProvider, ProviderModelMixin):
await raise_for_status(response)
data = await response.json()
images = data["output"] if "output" in data else data["images"]
+ if not images:
+ raise RuntimeError(f"Response: {data}")
images = images[0] if len(images) == 1 else images
return ImageResponse(images, prompt) \ No newline at end of file