fix:修复一些BUG

This commit is contained in:
2025-12-22 11:34:16 +08:00
parent 3c60b3e7ca
commit d3c0121632
8 changed files with 95 additions and 44 deletions

View File

@@ -69,9 +69,10 @@ def load_config(config_filename="config.toml"):
"class_name": class_info.get("class_name", "未命名班级"),
"teachers": class_info.get("teachers", []),
"class_type": class_info.get("class_type", 0),
"default_comment": defaults.get("default_comment", "暂无评语"),
"age_group": defaults.get("age_group", "大班上学期"),
"ai": data.get("ai", {"api_key": "", "api_url": "", "model": ""}),
"ai": data.get("ai", {"api_key": "", "api_url": "", "model":"","prompt":""}),
}
return config
@@ -103,6 +104,7 @@ def save_config(config_data, config_filename="config.toml"):
"class_info": {
"class_name": config_data.get("class_name", ""),
"teachers": config_data.get("teachers", []),
"class_type": config_data.get("class_type", 0),
},
"defaults": {
"default_comment": config_data.get("default_comment", ""),