gpt4free/g4f/client/image_models.py

15 lines
374 B
Python
Raw Normal View History

from __future__ import annotations
from ..models import ModelUtils
2024-04-06 22:27:21 +03:00
2024-04-06 22:24:48 +03:00
class ImageModels():
def __init__(self, client):
2024-04-06 22:24:48 +03:00
self.client = client
self.models = ModelUtils.convert
2024-04-06 22:24:48 +03:00
def get(self, name, default=None):
model = self.models.get(name)
if model and model.best_provider:
return model.best_provider
return default