mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
perf: 在session自动重置时保留非default的prompt (#494)
This commit is contained in:
parent
06037df607
commit
b4fc1057d1
|
@ -345,6 +345,7 @@ class Session:
|
||||||
if expired:
|
if expired:
|
||||||
pkg.utils.context.get_database_manager().set_session_expired(self.name, self.create_timestamp)
|
pkg.utils.context.get_database_manager().set_session_expired(self.name, self.create_timestamp)
|
||||||
|
|
||||||
|
if use_prompt:
|
||||||
self.default_prompt = self.get_default_prompt(use_prompt)
|
self.default_prompt = self.get_default_prompt(use_prompt)
|
||||||
self.prompt = []
|
self.prompt = []
|
||||||
self.token_counts = []
|
self.token_counts = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user