diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-04-06 21:24:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-06 21:24:48 +0200 |
commit | 3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377 (patch) | |
tree | dee09db83a39a8ebcf404caa03689b5baaf6e8cc /g4f/client/image_models.py | |
parent | Update async.py (diff) | |
download | gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.tar gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.tar.gz gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.tar.bz2 gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.tar.lz gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.tar.xz gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.tar.zst gpt4free-3f17f9b8e2fc5ed4f4bd499d825bdb1754e13377.zip |
Diffstat (limited to 'g4f/client/image_models.py')
-rw-r--r-- | g4f/client/image_models.py | 11 |
1 files changed, 11 insertions, 0 deletions
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 |