Tuchuanhuhuhu commited on
Commit
93721f8
1 Parent(s): ea9cb69

不自动load未登录用户的history

Browse files
Files changed (1) hide show
  1. modules/models/base_model.py +2 -0
modules/models/base_model.py CHANGED
@@ -569,6 +569,8 @@ class BaseLLMModel:
569
  return filename, self.system_prompt, gr.update()
570
 
571
  def auto_load(self):
 
 
572
  history_file_path = get_history_filepath(self.user_identifier)
573
  filename, system_prompt, chatbot = self.load_chat_history(history_file_path, self.user_identifier)
574
  return system_prompt, chatbot
 
569
  return filename, self.system_prompt, gr.update()
570
 
571
  def auto_load(self):
572
+ if self.user_identifier == "":
573
+ return self.system_prompt, gr.update()
574
  history_file_path = get_history_filepath(self.user_identifier)
575
  filename, system_prompt, chatbot = self.load_chat_history(history_file_path, self.user_identifier)
576
  return system_prompt, chatbot