fix:1.修复自定义系统模板提示词的多出问题

This commit is contained in:
xiamuceer
2025-11-30 12:25:47 +08:00
parent 19e08d99b3
commit 1bb3be3942
4 changed files with 44 additions and 13 deletions
+6 -1
View File
@@ -53,7 +53,12 @@ class PlotAnalyzer:
analysis_content = content[:8000] if len(content) > 8000 else content
# 获取自定义提示词模板
template = await PromptService.get_template("PLOT_ANALYSIS", user_id, db)
if user_id and db:
template = await PromptService.get_template("PLOT_ANALYSIS", user_id, db)
else:
# 降级到系统默认模板
template = PromptService.PLOT_ANALYSIS
# 格式化提示词
prompt = PromptService.format_prompt(
template,