summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Bing.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-08-28 22:08:23 +0200
committerGitHub <noreply@github.com>2023-08-28 22:08:23 +0200
commit7e687b3d178c00a27d7e5ae2613fe88ee7844639 (patch)
tree4034e8ae9fc7ca9af295f04358bb00516b464e0b /g4f/Provider/Bing.py
parentMerge pull request #851 from Luneye/patch-1 (diff)
parentMerge branch 'main' into hugging (diff)
downloadgpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.tar
gpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.tar.gz
gpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.tar.bz2
gpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.tar.lz
gpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.tar.xz
gpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.tar.zst
gpt4free-7e687b3d178c00a27d7e5ae2613fe88ee7844639.zip
Diffstat (limited to 'g4f/Provider/Bing.py')
-rw-r--r--g4f/Provider/Bing.py10
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
+