diff --git a/libs/genai/langchain_google_genai/_image_utils.py b/libs/genai/langchain_google_genai/_image_utils.py index 4fabcd84..35835778 100644 --- a/libs/genai/langchain_google_genai/_image_utils.py +++ b/libs/genai/langchain_google_genai/_image_utils.py @@ -8,8 +8,8 @@ from typing import Any, Dict from urllib.parse import urlparse +import filetype # type: ignore[import] import requests -import filetype from google.ai.generativelanguage_v1beta.types import Part @@ -88,7 +88,7 @@ def load_part(self, image_string: str) -> Part: raise ValueError(msg) inline_data: Dict[str, Any] = {"data": bytes_} - + mime_type, _ = mimetypes.guess_type(image_string) if not mime_type: kind = filetype.guess(bytes_)