summaryrefslogtreecommitdiffstats
path: root/g4f/client/image_models.py
blob: 0c8ea894d05a609f767d94d6c3c5f0b1ba22f9f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class ImageModels():
    gemini = Gemini
    openai = OpenaiChat
    you = You

    def __init__(self, client: Client) -> None:
        self.client = client
        self.default = BingCreateImages(proxy=self.client.get_proxy())

    def get(self, name: str, default: ImageProvider = None) -> ImageProvider:
        return getattr(self, name) if hasattr(self, name) else default or self.default