mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
bug:修复上次更新后不响应的问题
This commit is contained in:
parent
e2e93afd06
commit
c94a9e1ae6
|
@ -89,7 +89,7 @@ def get_prompt(name: str = None) -> str:
|
|||
with open(json_file, 'r', encoding ='utf-8') as f:
|
||||
json_content = json.load(f)
|
||||
logging.debug('succeed to load json: {}'.format(json_file))
|
||||
return json_content['prompt']
|
||||
return json_content['prompt'], json_content['name'], json_content['filter']
|
||||
|
||||
except FileNotFoundError:
|
||||
|
||||
|
|
|
@ -306,7 +306,8 @@ class Session:
|
|||
|
||||
if expired:
|
||||
pkg.utils.context.get_database_manager().set_session_expired(self.name, self.create_timestamp)
|
||||
self.prompt = self.get_default_prompt(use_prompt)
|
||||
# a, b为bot_name和bot_filter占位变量
|
||||
self.prompt, a, b = self.get_default_prompt(use_prompt)
|
||||
self.create_timestamp = int(time.time())
|
||||
self.last_interact_timestamp = int(time.time())
|
||||
self.just_switched_to_exist_session = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user