summaryrefslogtreecommitdiffstats
path: root/g4f/api/__init__.py
diff options
context:
space:
mode:
authorkqlio67 <kqlio67@users.noreply.github.com>2024-11-09 18:40:49 +0100
committerkqlio67 <kqlio67@users.noreply.github.com>2024-11-09 18:40:49 +0100
commitb2b978c9de7f2bd7d2dfae374fe3d61290107ae5 (patch)
tree5982830c9e42562c8c522f8c4c37f664e11f8719 /g4f/api/__init__.py
parentUpdate (g4f/Provider/) (diff)
downloadgpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.tar
gpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.tar.gz
gpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.tar.bz2
gpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.tar.lz
gpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.tar.xz
gpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.tar.zst
gpt4free-b2b978c9de7f2bd7d2dfae374fe3d61290107ae5.zip
Diffstat (limited to 'g4f/api/__init__.py')
-rw-r--r--g4f/api/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py
index fadeb0d8..b9591b20 100644
--- a/g4f/api/__init__.py
+++ b/g4f/api/__init__.py
@@ -223,7 +223,7 @@ class Api:
response_format=config.response_format
)
# Convert Image objects to dictionaries
- response_data = [image.to_dict() for image in response.data]
+ response_data = [{"url": image.url, "b64_json": image.b64_json} for image in response.data]
return JSONResponse({"data": response_data})
except Exception as e:
logging.exception(e)