Skip to content

Commit

Permalink
在重置会话时自动加载默认预设
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTcraftHIM authored and lss233 committed Mar 3, 2024
1 parent d1f9c37 commit 7a27f4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7a27f4a

Please sign in to comment.