mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Add more live info
This commit is contained in:
parent
9fbff6347c
commit
b4ed1a55da
3 changed files with 5 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ class OpenaiTemplate(AsyncGeneratorProvider, ProviderModelMixin, RaiseErrorMixin
|
|||
raise_for_status(response)
|
||||
data = response.json()
|
||||
data = data.get("data") if isinstance(data, dict) else data
|
||||
if (not cls.needs_auth or cls.models_needs_auth) and data:
|
||||
if (not cls.needs_auth or cls.models_needs_auth or api_key) and data:
|
||||
cls.live += 1
|
||||
cls.image_models = [model.get("name") if cls.use_model_names else model.get("id", model.get("name")) for model in data if model.get("image") or model.get("type") == "image" or model.get("supports_images")]
|
||||
cls.vision_models = cls.vision_models.copy()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue