Tuchuanhuhuhu commited on
Commit
544e08e
1 Parent(s): ffd1e43

feat: 去除.json

Browse files
Files changed (1) hide show
  1. modules/models/base_model.py +2 -0
modules/models/base_model.py CHANGED
@@ -688,6 +688,8 @@ class BaseLLMModel:
688
  HISTORY_DIR, user_name, filename)
689
  else:
690
  history_file_path = filename
 
 
691
  with open(history_file_path, "r", encoding="utf-8") as f:
692
  json_s = json.load(f)
693
  try:
 
688
  HISTORY_DIR, user_name, filename)
689
  else:
690
  history_file_path = filename
691
+ if not filename.endswith(".json"):
692
+ history_file_path += ".json"
693
  with open(history_file_path, "r", encoding="utf-8") as f:
694
  json_s = json.load(f)
695
  try: