diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2023-11-04 22:43:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 22:43:23 +0100 |
commit | e98619688357de30a8626c5a5521622d2cbc5f84 (patch) | |
tree | 0c329d742ba13ef90aa56a09bb2e8bf1b70a0cc5 | |
parent | Merge pull request #1202 from Commenter123321/main (diff) | |
parent | Update Bing.py - Removed unnecessary "await" statements that could potentially lead to errors (diff) | |
download | gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.tar gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.tar.gz gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.tar.bz2 gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.tar.lz gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.tar.xz gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.tar.zst gpt4free-e98619688357de30a8626c5a5521622d2cbc5f84.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Bing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py index 726faa2b..b790a6d2 100644 --- a/g4f/Provider/Bing.py +++ b/g4f/Provider/Bing.py @@ -71,7 +71,7 @@ class Conversation(): async def create_conversation(session: ClientSession, tone: str, image: str = None, proxy: str = None) -> Conversation: url = 'https://www.bing.com/turing/conversation/create?bundleVersion=1.1199.4' - async with await session.get(url, proxy=proxy) as response: + async with session.get(url, proxy=proxy) as response: data = await response.json() conversationId = data.get('conversationId') @@ -115,7 +115,7 @@ async def create_conversation(session: ClientSession, tone: str, image: str = No headers["content-type"] = f'multipart/form-data; boundary={boundary}' headers["referer"] = 'https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx' headers["origin"] = 'https://www.bing.com' - async with await session.post("https://www.bing.com/images/kblob", data=data, headers=headers, proxy=proxy) as image_upload_response: + async with session.post("https://www.bing.com/images/kblob", data=data, headers=headers, proxy=proxy) as image_upload_response: if image_upload_response.status != 200: raise Exception("Failed to upload image.") |