diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-12-06 09:35:36 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-12-06 09:35:36 +0100 |
commit | 3576dee75a1623aa2385b6afe8b922ad5affca26 (patch) | |
tree | f54f68590875e4e67adaab03139f18167ffc7fa1 /g4f/Provider/Bing.py | |
parent | Add get_session_from_browser as cloudflare bypass (diff) | |
download | gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.gz gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.bz2 gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.lz gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.xz gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.tar.zst gpt4free-3576dee75a1623aa2385b6afe8b922ad5affca26.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Bing.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py index b790a6d2..9e3e7405 100644 --- a/g4f/Provider/Bing.py +++ b/g4f/Provider/Bing.py @@ -156,8 +156,11 @@ async def delete_conversation(session: ClientSession, conversation: Conversation "optionsSets": ["autosave"] } async with session.post(url, json=json, proxy=proxy) as response: - response = await response.json() - return response["result"]["value"] == "Success" + try: + response = await response.json() + return response["result"]["value"] == "Success" + except: + return False class Defaults: delimiter = "\x1e" |