From deb3898e7a68c1e5131b943ac687ca90a41c2d72 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Thu, 11 Apr 2024 03:52:37 +0200 Subject: Update DeepInfraImage.py --- g4f/Provider/DeepInfraImage.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'g4f') 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 -- cgit v1.2.3