From 335c971f6a9cd071d18f9fffeb76df4eda8876d5 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Fri, 13 Dec 2024 22:20:58 +0100 Subject: Add multiple images support (#2478) * Add multiple images support * Add multiple images support in gui * Support multiple images in legacy client and in the api Fix some model names in provider model list * Fix unittests * Add vision and providers docs --- g4f/typing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'g4f/typing.py') diff --git a/g4f/typing.py b/g4f/typing.py index 48a4e90d..5ea09c6c 100644 --- a/g4f/typing.py +++ b/g4f/typing.py @@ -19,7 +19,8 @@ CreateResult = Iterator[Union[str, ResponseType]] AsyncResult = AsyncIterator[Union[str, ResponseType]] Messages = List[Dict[str, Union[str, List[Dict[str, Union[str, Dict[str, str]]]]]]] Cookies = Dict[str, str] -ImageType = Union[str, bytes, IO, Image, None] +ImageType = Union[str, bytes, IO, Image] +ImagesType = List[Tuple[ImageType, Optional[str]]] __all__ = [ 'Any', @@ -41,5 +42,6 @@ __all__ = [ 'Messages', 'Cookies', 'Image', - 'ImageType' + 'ImageType', + 'ImagesType' ] -- cgit v1.2.3