mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 12:05:54 +00:00
perf: 在session自动重置时保留非default的prompt (#494)
This commit is contained in:
@@ -345,7 +345,8 @@ class Session:
|
||||
if expired:
|
||||
pkg.utils.context.get_database_manager().set_session_expired(self.name, self.create_timestamp)
|
||||
|
||||
self.default_prompt = self.get_default_prompt(use_prompt)
|
||||
if use_prompt:
|
||||
self.default_prompt = self.get_default_prompt(use_prompt)
|
||||
self.prompt = []
|
||||
self.token_counts = []
|
||||
self.create_timestamp = int(time.time())
|
||||
|
||||
Reference in New Issue
Block a user