diff options
Diffstat (limited to 'g4f/Provider/bing/conversation.py')
-rw-r--r-- | g4f/Provider/bing/conversation.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/g4f/Provider/bing/conversation.py b/g4f/Provider/bing/conversation.py index da842808..886efa68 100644 --- a/g4f/Provider/bing/conversation.py +++ b/g4f/Provider/bing/conversation.py @@ -20,7 +20,7 @@ class Conversation: self.clientId = clientId self.conversationSignature = conversationSignature -async def create_conversation(session: ClientSession, headers: dict) -> Conversation: +async def create_conversation(session: ClientSession, headers: dict, tone: str) -> Conversation: """ Create a new conversation asynchronously. @@ -31,7 +31,10 @@ async def create_conversation(session: ClientSession, headers: dict) -> Conversa Returns: Conversation: An instance representing the created conversation. """ - url = "https://www.bing.com/turing/conversation/create?bundleVersion=1.1626.1" + if tone == "copilot": + url = "https://copilot.microsoft.com/turing/conversation/create?bundleVersion=1.1634.3-nodesign2" + else: + url = "https://www.bing.com/turing/conversation/create?bundleVersion=1.1626.1" async with session.get(url, headers=headers) as response: await raise_for_status(response, "Failed to create conversation") data = await response.json() |