diff --git a/src/mistral_common/multimodal.py b/src/mistral_common/multimodal.py index 7829612..88224c3 100644 --- a/src/mistral_common/multimodal.py +++ b/src/mistral_common/multimodal.py @@ -9,6 +9,7 @@ from mistral_common import __version__ + def download_image(url: str) -> Image.Image: headers = {"User-Agent": f"mistral-common/{__version__}"} try: diff --git a/src/mistral_common/tokens/tokenizers/base.py b/src/mistral_common/tokens/tokenizers/base.py index 3853a4b..b51f917 100644 --- a/src/mistral_common/tokens/tokenizers/base.py +++ b/src/mistral_common/tokens/tokenizers/base.py @@ -150,8 +150,7 @@ def __call__(self, content: Union[ImageChunk, ImageURLChunk]) -> ImageEncoding: ... @property - def image_token(self) -> int: - ... + def image_token(self) -> int: ... class InstructTokenizer(Generic[InstructRequestType, FIMRequestType, TokenizedType, AssistantMessageType]): @@ -182,8 +181,7 @@ def encode_user_message( is_first: bool, system_prompt: Optional[str] = None, force_img_first: bool = False, - ) -> Tuple[List[int], List[np.ndarray]]: - ... + ) -> Tuple[List[int], List[np.ndarray]]: ... @abstractmethod def encode_user_content( @@ -192,5 +190,4 @@ def encode_user_content( is_last: bool, system_prompt: Optional[str] = None, force_img_first: bool = False, - ) -> Tuple[List[int], List[np.ndarray]]: - ... + ) -> Tuple[List[int], List[np.ndarray]]: ...