mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-25 04:01:52 +03:00
ffb4b0d162
* Improve download of generated images, serve images in the api Add support for conversation handling in the api * Add orginal prompt to image response * Add download images option in gui, fix loading model list in Airforce * Add download images option in gui, fix loading model list in Airforce
15 lines
374 B
Python
15 lines
374 B
Python
from __future__ import annotations
|
|
|
|
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
|