From ecf110e59a35ad41377b82d8d1f5f58802b66539 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Wed, 13 Mar 2024 05:27:54 +0100 Subject: Fix Bing create images, Add gui in webview init --- g4f/Provider/BingCreateImages.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'g4f/Provider/BingCreateImages.py') diff --git a/g4f/Provider/BingCreateImages.py b/g4f/Provider/BingCreateImages.py index c465c1d8..f9c4f3b3 100644 --- a/g4f/Provider/BingCreateImages.py +++ b/g4f/Provider/BingCreateImages.py @@ -7,14 +7,15 @@ from typing import Iterator, Union from ..cookies import get_cookies from ..image import ImageResponse from ..errors import MissingRequirementsError, MissingAuthError +from ..typing import Cookies from .bing.create_images import create_images, create_session, get_cookies_from_browser class BingCreateImages: """A class for creating images using Bing.""" - def __init__(self, cookies: dict[str, str] = {}, proxy: str = None) -> None: - self.cookies = cookies - self.proxy = proxy + def __init__(self, cookies: Cookies = None, proxy: str = None) -> None: + self.cookies: Cookies = cookies + self.proxy: str = proxy def create(self, prompt: str) -> Iterator[Union[ImageResponse, str]]: """ -- cgit v1.2.3