diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-04-21 07:22:59 +0200 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-04-21 07:22:59 +0200 |
commit | db2d6cffd9268e8842f0c2aa8e062c0e19d88d28 (patch) | |
tree | 2b44e3ec6e21a8c1270f3d84a4a1f0efb360d37b /g4f/Provider/bing | |
parent | Disable Bing integration test (diff) | |
download | gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.tar gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.tar.gz gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.tar.bz2 gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.tar.lz gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.tar.xz gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.tar.zst gpt4free-db2d6cffd9268e8842f0c2aa8e062c0e19d88d28.zip |
Diffstat (limited to 'g4f/Provider/bing')
-rw-r--r-- | g4f/Provider/bing/conversation.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/g4f/Provider/bing/conversation.py b/g4f/Provider/bing/conversation.py index 85292079..4cfeef8e 100644 --- a/g4f/Provider/bing/conversation.py +++ b/g4f/Provider/bing/conversation.py @@ -1,7 +1,6 @@ from __future__ import annotations -from aiohttp import ClientSession -from ...requests import raise_for_status +from ...requests import StreamSession, raise_for_status from ...errors import RateLimitError from ...providers.conversation import BaseConversation @@ -22,7 +21,7 @@ class Conversation(BaseConversation): self.clientId = clientId self.conversationSignature = conversationSignature -async def create_conversation(session: ClientSession, headers: dict, tone: str) -> Conversation: +async def create_conversation(session: StreamSession, headers: dict, tone: str) -> Conversation: """ Create a new conversation asynchronously. @@ -49,7 +48,7 @@ async def create_conversation(session: ClientSession, headers: dict, tone: str) raise RuntimeError('Empty fields: Failed to create conversation') return Conversation(conversationId, clientId, conversationSignature) -async def list_conversations(session: ClientSession) -> list: +async def list_conversations(session: StreamSession) -> list: """ List all conversations asynchronously. @@ -64,7 +63,7 @@ async def list_conversations(session: ClientSession) -> list: response = await response.json() return response["chats"] -async def delete_conversation(session: ClientSession, conversation: Conversation, headers: dict) -> bool: +async def delete_conversation(session: StreamSession, conversation: Conversation, headers: dict) -> bool: """ Delete a conversation asynchronously. |