From 3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Sat, 6 Apr 2024 21:24:48 +0200 Subject: Create image_models.py --- g4f/client/image_models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 g4f/client/image_models.py (limited to 'g4f/client') diff --git a/g4f/client/image_models.py b/g4f/client/image_models.py new file mode 100644 index 00000000..0c8ea894 --- /dev/null +++ b/g4f/client/image_models.py @@ -0,0 +1,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 -- cgit v1.2.3