mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
fix(template-utils): str.format -> string.Template (#149)
* feat: upgrade prompt templates from str.format to string.Template for improved compatibility * fix(get_astrbot_data_path): fallback 到 get_astrbot_data_path 方法 * feat: upgrade prompt templates from str.format to string.Template for improved compatibility * fix: strict mode * fix: 补齐文件名格式的自动迁移 * fix(ChatQualityAnalyzer): 删除无效的 prompt 提示语句 * ruff --------- Co-authored-by: SXP-Simon <sxp20061207@163.com>
This commit is contained in:
@@ -220,6 +220,12 @@ class GroupDailyAnalysis(Star):
|
||||
|
||||
logger.info(f"正在执行插件初始化 (来源: {source})...")
|
||||
|
||||
# 0. 自动升级旧版 prompt 模板(str.format -> string.Template)并回写配置
|
||||
try:
|
||||
self.config_manager.upgrade_prompt_templates()
|
||||
except Exception as e:
|
||||
logger.warning(f"自动升级 prompt 模板失败: {e}")
|
||||
|
||||
# 1. 尝试发现 bot 实例
|
||||
await self.bot_manager.initialize_from_config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user