diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-08-28 22:08:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-28 22:08:23 +0200 |
commit | 7e687b3d178c00a27d7e5ae2613fe88ee7844639 (patch) | |
tree | 4034e8ae9fc7ca9af295f04358bb00516b464e0b /g4f/Provider/Bing.py | |
parent | Merge pull request #851 from Luneye/patch-1 (diff) | |
parent | Merge branch 'main' into hugging (diff) | |
download | gpt4free-0.0.2.6.tar gpt4free-0.0.2.6.tar.gz gpt4free-0.0.2.6.tar.bz2 gpt4free-0.0.2.6.tar.lz gpt4free-0.0.2.6.tar.xz gpt4free-0.0.2.6.tar.zst gpt4free-0.0.2.6.zip |
Diffstat (limited to 'g4f/Provider/Bing.py')
-rw-r--r-- | g4f/Provider/Bing.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py index 88394f70..5910c6b4 100644 --- a/g4f/Provider/Bing.py +++ b/g4f/Provider/Bing.py @@ -15,8 +15,11 @@ class Bing(AsyncGeneratorProvider): def create_async_generator( model: str, messages: list[dict[str, str]], - cookies: dict = get_cookies(".bing.com"), **kwargs) -> AsyncGenerator: - + cookies: dict = None, + **kwargs + ) -> AsyncGenerator: + if not cookies: + cookies = get_cookies(".bing.com") if len(messages) < 2: prompt = messages[0]["content"] context = None @@ -308,4 +311,5 @@ def run(generator: AsyncGenerator[Union[Any, str], Any]): yield loop.run_until_complete(gen.__anext__()) except StopAsyncIteration: - break
\ No newline at end of file + break + |