diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-05-18 08:12:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-18 08:12:17 +0200 |
commit | 4c3472f5417281ecf902edaec390bb1f7bafd808 (patch) | |
tree | 7851c85bafa452d0fa9cce74aa7b383aa704f101 /g4f/image.py | |
parent | Merge pull request #1969 from hlohaus/leech (diff) | |
parent | Improve Liabots provider, Add image api support (diff) | |
download | gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.tar gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.tar.gz gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.tar.bz2 gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.tar.lz gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.tar.xz gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.tar.zst gpt4free-4c3472f5417281ecf902edaec390bb1f7bafd808.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/image.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/g4f/image.py b/g4f/image.py index 270b59ad..3d339266 100644 --- a/g4f/image.py +++ b/g4f/image.py @@ -275,6 +275,18 @@ class ImagePreview(ImageResponse): def to_string(self): return super().__str__() +class ImageDataResponse(): + def __init__( + self, + images: Union[str, list], + alt: str, + ): + self.images = images + self.alt = alt + + def get_list(self) -> list[str]: + return [self.images] if isinstance(self.images, str) else self.images + class ImageRequest: def __init__( self, |