From b2b978c9de7f2bd7d2dfae374fe3d61290107ae5 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Sat, 9 Nov 2024 19:40:49 +0200 Subject: feat(g4f/api/__init__.py): Update image generation response format --- g4f/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3