fix: 修复bing会话超时过期的问题

This commit is contained in:
Soulter
2023-04-20 08:59:58 +08:00
parent 743a800b0d
commit 4cb5abc7b6

View File

@@ -32,6 +32,8 @@ class ProviderRevEdgeGPT(Provider):
try:
resp = await self.bot.ask(prompt=prompt, conversation_style=ConversationStyle.creative)
# print("[RevEdgeGPT] "+str(resp))
if 'messages' not in resp['item']:
await self.bot.reset()
msj_obj = resp['item']['messages'][len(resp['item']['messages'])-1]
reply_msg = msj_obj['text']
if 'sourceAttributions' in msj_obj: