From 9327f2c2df06452f77c6375c8fa39eafb5e33c7b Mon Sep 17 00:00:00 2001 From: RA Date: Sun, 26 Mar 2023 22:20:14 +0800 Subject: [PATCH] [bug fixed]caused by EdgeGPT 0.1.10 update --- model/bing/jailbroken_sydney.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/model/bing/jailbroken_sydney.py b/model/bing/jailbroken_sydney.py index bacaff3..581f788 100644 --- a/model/bing/jailbroken_sydney.py +++ b/model/bing/jailbroken_sydney.py @@ -50,7 +50,7 @@ class SydneyBot(Chatbot): conversation_style: EdgeGPT.CONVERSATION_STYLE_TYPE = None, message_id: str = None, ) -> dict: - #开启新对话 + # 开启新对话 self.chat_hub = SydneyHub(Conversation( self.cookiePath, self.cookies, self.proxy)) self.parent_message_id = message_id if message_id != None else uuid.uuid4() @@ -129,7 +129,7 @@ class SydneyHub(ChatHub): prompt: str, conversation_style: EdgeGPT.CONVERSATION_STYLE_TYPE = None, ) -> Generator[str, None, None]: - async for item in super().ask_stream(prompt, conversation_style): + async for item in super().ask_stream(prompt=prompt, conversation_style=conversation_style): yield item @@ -142,8 +142,8 @@ class SydneyHubRequest(ChatHubRequest): conversation_id: str, invocation_id: int = 0, ) -> None: - super().__init__(conversation_signature, client_id, - conversation_id, invocation_id) + super().__init__(conversation_signature=conversation_signature, client_id=client_id, + conversation_id=conversation_id, invocation_id=invocation_id) self.previous_messages = "" def update( @@ -153,7 +153,7 @@ class SydneyHubRequest(ChatHubRequest): options: list | None = None, ) -> None: self.invocation_id = 0 - super().update(prompt, conversation_style, options) + super().update(prompt=prompt, conversation_style=conversation_style, options=options) self.struct["arguments"][0]["message"]["messageType"] = "SearchQuery" self.struct["arguments"][0]["previousMessages"] = [ {"text": "N/A\n\n"+self.previous_messages, "author": 'bot', }]