summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/bing
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-21 15:15:55 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-21 15:15:55 +0200
commita26421bcd8b8580650fa05b3fb4f8fdfa0ef9921 (patch)
treeb1c7ff275c54682e29f89f07638b8fdd1743e0e1 /g4f/Provider/bing
parentAdd MissingRequirementsError to You (diff)
downloadgpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar
gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.gz
gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.bz2
gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.lz
gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.xz
gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.zst
gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.zip
Diffstat (limited to 'g4f/Provider/bing')
-rw-r--r--g4f/Provider/bing/conversation.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/Provider/bing/conversation.py b/g4f/Provider/bing/conversation.py
index 4cfeef8e..a4195fa4 100644
--- a/g4f/Provider/bing/conversation.py
+++ b/g4f/Provider/bing/conversation.py
@@ -41,6 +41,8 @@ async def create_conversation(session: StreamSession, headers: dict, tone: str)
raise RateLimitError("Response 404: Do less requests and reuse conversations")
await raise_for_status(response, "Failed to create conversation")
data = await response.json()
+ if not data:
+ raise RuntimeError('Empty response: Failed to create conversation')
conversationId = data.get('conversationId')
clientId = data.get('clientId')
conversationSignature = response.headers.get('X-Sydney-Encryptedconversationsignature')