diff --git a/instructor/multimodal.py b/instructor/multimodal.py index c26dd9ff4..f27a8bb77 100644 --- a/instructor/multimodal.py +++ b/instructor/multimodal.py @@ -118,7 +118,7 @@ def from_raw_base64(cls, data: str) -> "Image": decoded: bytes = base64.b64decode(data) import imghdr - img_type: str | None = imghdr.what(None, decoded) + img_type: Union[str, None] = imghdr.what(None, decoded) if img_type: media_type: str = f"image/{img_type}" if media_type in VALID_MIME_TYPES: