summaryrefslogtreecommitdiffstats
path: root/g4f/gui
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-11-20 10:12:54 +0100
committerGitHub <noreply@github.com>2024-11-20 10:12:54 +0100
commitc959d9b469c9a23e2657a0d51cb6e735b71082a9 (patch)
tree29dfd4bffce34241a19b2a9790eb2d173cfa96cb /g4f/gui
parentFix image generation in OpenaiChat (#2390) (diff)
downloadgpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.tar
gpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.tar.gz
gpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.tar.bz2
gpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.tar.lz
gpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.tar.xz
gpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.tar.zst
gpt4free-c959d9b469c9a23e2657a0d51cb6e735b71082a9.zip
Diffstat (limited to 'g4f/gui')
-rw-r--r--g4f/gui/server/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py
index 2d871ff3..29fc34e2 100644
--- a/g4f/gui/server/api.py
+++ b/g4f/gui/server/api.py
@@ -48,7 +48,7 @@ class Api:
"model": model,
"default": model == provider.default_model,
"vision": getattr(provider, "default_vision_model", None) == model or model in getattr(provider, "vision_models", []),
- "image": model in getattr(provider, "image_models", []),
+ "image": False if provider.image_models is None else model in provider.image_models,
}
for model in models
]