summaryrefslogtreecommitdiffstats
path: root/g4f/image.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-17 11:06:37 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-17 11:06:37 +0100
commitea1448001df9c66f05a52618eb3e40a88df5efe8 (patch)
tree3f113ea8beb7c43920871019512aeb8de9d1b4f7 /g4f/image.py
parentFix api streaming, fix AsyncClient (#2357) (diff)
downloadgpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.tar
gpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.tar.gz
gpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.tar.bz2
gpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.tar.lz
gpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.tar.xz
gpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.tar.zst
gpt4free-ea1448001df9c66f05a52618eb3e40a88df5efe8.zip
Diffstat (limited to '')
-rw-r--r--g4f/image.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/image.py b/g4f/image.py
index 556ec43d..8a3d7a74 100644
--- a/g4f/image.py
+++ b/g4f/image.py
@@ -133,7 +133,7 @@ def extract_data_uri(data_uri: str) -> bytes:
Returns:
bytes: The extracted binary data.
"""
- data = data_uri.split(",")[1]
+ data = data_uri.split(",")[-1]
data = base64.b64decode(data)
return data