chore: 移除过时的兼容性处理代码

This commit is contained in:
RockChinQ
2024-01-18 00:52:29 +08:00
parent aa433bd5ab
commit 5bbc38a7a3
8 changed files with 22 additions and 85 deletions
+3 -6
View File
@@ -39,12 +39,9 @@ class ListCommand(aamgr.AbstractCommandNode):
# 时间(使用create_timestamp转换) 序号 部分内容
datetime_obj = datetime.datetime.fromtimestamp(results[i]['create_timestamp'])
msg = ""
try:
msg = json.loads(results[i]['prompt'])
except json.decoder.JSONDecodeError:
msg = pkg.openai.session.reset_session_prompt(session_name, results[i]['prompt'])
# 持久化
pkg.openai.session.get_session(session_name).persistence()
msg = json.loads(results[i]['prompt'])
if len(msg) >= 2:
reply_str += "#{} 创建:{} {}\n".format(i + page * 10,
datetime_obj.strftime("%Y-%m-%d %H:%M:%S"),