diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-05-21 22:58:56 +0200 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-05-21 22:58:56 +0200 |
commit | 62b2b279ab7f06b14aefb0b3ba09111e004a6003 (patch) | |
tree | 30609eb68c513387bd616a14f9cec3b82db6eaff /g4f/image.py | |
parent | Add streaming and conversation support to gemini (diff) | |
download | gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.tar gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.tar.gz gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.tar.bz2 gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.tar.lz gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.tar.xz gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.tar.zst gpt4free-62b2b279ab7f06b14aefb0b3ba09111e004a6003.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/image.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/g4f/image.py b/g4f/image.py index a677e8df..6561b83a 100644 --- a/g4f/image.py +++ b/g4f/image.py @@ -16,6 +16,13 @@ from .errors import MissingRequirementsError ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'} +EXTENSIONS_MAP: dict[str, str] = { + "image/png": "png", + "image/jpeg": "jpg", + "image/gif": "gif", + "image/webp": "webp", +} + def to_image(image: ImageType, is_svg: bool = False) -> Image: """ Converts the input image to a PIL Image object. |