From f4dddfdfb7b2ec30a46d0807bad686d51fe17cea Mon Sep 17 00:00:00 2001 From: Mohamed El Banani Date: Wed, 3 Jul 2024 17:32:04 -0700 Subject: [PATCH] Add PngImagePlugin to imports. --- google/generativeai/types/content_types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/google/generativeai/types/content_types.py b/google/generativeai/types/content_types.py index 82d36f7c5..e2e2b680d 100644 --- a/google/generativeai/types/content_types.py +++ b/google/generativeai/types/content_types.py @@ -30,6 +30,7 @@ if typing.TYPE_CHECKING: import PIL.Image + import PIL.PngImagePlugin import IPython.display IMAGE_TYPES = (PIL.Image.Image, IPython.display.Image) @@ -37,6 +38,7 @@ IMAGE_TYPES = () try: import PIL.Image + import PIL.PngImagePlugin IMAGE_TYPES = IMAGE_TYPES + (PIL.Image.Image,) except ImportError: