mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-27 21:21:41 +03:00
17 lines
416 B
Python
17 lines
416 B
Python
from __future__ import annotations
|
|
|
|
from .types import Client, ImageProvider
|
|
|
|
from ..models import ModelUtils
|
|
|
|
class ImageModels():
|
|
def __init__(self, client):
|
|
self.client = client
|
|
self.models = ModelUtils.convert
|
|
|
|
def get(self, name, default=None):
|
|
model = self.models.get(name)
|
|
if model and model.best_provider:
|
|
return model.best_provider
|
|
return default
|