mirror of
https://github.com/zhayujie/bot-on-anything.git
synced 2026-01-19 01:21:06 +08:00
bing bug fixed
This commit is contained in:
@@ -87,6 +87,8 @@ class SydneyBot(Chatbot):
|
||||
):
|
||||
if final:
|
||||
try:
|
||||
if self.chat_hub.wss and not self.chat_hub.wss.closed:
|
||||
await self.chat_hub.wss.close()
|
||||
self.update_reply_cache(response["item"]["messages"][-1])
|
||||
except Exception as e:
|
||||
self.conversations_cache[self.conversation_key]["messages"].pop()
|
||||
@@ -99,9 +101,6 @@ class SydneyBot(Chatbot):
|
||||
conversation_style: EdgeGPT.CONVERSATION_STYLE_TYPE = None,
|
||||
message_id: str = None
|
||||
) -> dict:
|
||||
if self.chat_hub.wss:
|
||||
if not self.chat_hub.wss.closed:
|
||||
await self.chat_hub.wss.close()
|
||||
async for final, response in self.ask_stream(
|
||||
prompt=prompt,
|
||||
conversation_style=conversation_style,
|
||||
|
||||
@@ -2,4 +2,5 @@ PyJWT
|
||||
flask
|
||||
flask_socketio
|
||||
itchat-uos==1.5.0.dev0
|
||||
openai
|
||||
openai
|
||||
EdgeGPT
|
||||
Reference in New Issue
Block a user