From ffb4b0d162cc29b1caa4539d854de37206804225 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Wed, 20 Nov 2024 19:58:16 +0100 Subject: Improve download of generated images, serve images in the api (#2391) * Improve download of generated images, serve images in the api Add support for conversation handling in the api * Add orginal prompt to image response * Add download images option in gui, fix loading model list in Airforce * Add download images option in gui, fix loading model list in Airforce --- g4f/Provider/needs_auth/BingCreateImages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'g4f/Provider/needs_auth/BingCreateImages.py') diff --git a/g4f/Provider/needs_auth/BingCreateImages.py b/g4f/Provider/needs_auth/BingCreateImages.py index 80984d40..b95a78c3 100644 --- a/g4f/Provider/needs_auth/BingCreateImages.py +++ b/g4f/Provider/needs_auth/BingCreateImages.py @@ -28,13 +28,14 @@ class BingCreateImages(AsyncGeneratorProvider, ProviderModelMixin): cls, model: str, messages: Messages, + prompt: str = None, api_key: str = None, cookies: Cookies = None, proxy: str = None, **kwargs ) -> AsyncResult: session = BingCreateImages(cookies, proxy, api_key) - yield await session.generate(messages[-1]["content"]) + yield await session.generate(messages[-1]["content"] if prompt is None else prompt) async def generate(self, prompt: str) -> ImageResponse: """ -- cgit v1.2.3