summaryrefslogtreecommitdiffstats
path: root/g4f/image.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-18 07:37:37 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-05-18 07:37:37 +0200
commitb1dafc0ef79bdd94f69c783877217d8a5524d460 (patch)
tree7851c85bafa452d0fa9cce74aa7b383aa704f101 /g4f/image.py
parentMerge pull request #1969 from hlohaus/leech (diff)
downloadgpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.tar
gpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.tar.gz
gpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.tar.bz2
gpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.tar.lz
gpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.tar.xz
gpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.tar.zst
gpt4free-b1dafc0ef79bdd94f69c783877217d8a5524d460.zip
Diffstat (limited to '')
-rw-r--r--g4f/image.py12
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,