From 7a27f4ae065e2a5d38976aea649b413d850b8640 Mon Sep 17 00:00:00 2001 From: AAA <35992542+TNTcraftHIM@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:54:55 +1100 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E9=87=8D=E7=BD=AE=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E5=8A=A0=E8=BD=BD=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=A2=84=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conversation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conversation.py b/conversation.py index b9457809..2c749b91 100644 --- a/conversation.py +++ b/conversation.py @@ -153,6 +153,9 @@ async def reset(self): await self.adapter.on_reset() self.last_resp = '' self.last_resp_time = -1 + # 在重置会话时自动加载默认预设 + async for value in self.load_preset('default'): + pass yield config.response.reset @retry((httpx.ConnectError, httpx.ConnectTimeout, TimeoutError))