diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-03-13 05:27:54 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-03-13 05:27:54 +0100 |
commit | ecf110e59a35ad41377b82d8d1f5f58802b66539 (patch) | |
tree | c3d9da4d4305c14fe01b3fcd77af161b7fb2a9cb /g4f/Provider/BingCreateImages.py | |
parent | Add count chars to gui, Add retry support to fix rate limit in Bing (diff) | |
download | gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.tar gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.tar.gz gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.tar.bz2 gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.tar.lz gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.tar.xz gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.tar.zst gpt4free-ecf110e59a35ad41377b82d8d1f5f58802b66539.zip |
Diffstat (limited to 'g4f/Provider/BingCreateImages.py')
-rw-r--r-- | g4f/Provider/BingCreateImages.py | 7 |
1 files changed, 4 insertions, 3 deletions
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]]: """ |