fix: restore main runtime sources and cache consistency

This commit is contained in:
User
2026-07-14 14:19:36 +08:00
parent e40989eeab
commit f951bc6598
15 changed files with 1664 additions and 29 deletions

View File

@@ -1032,6 +1032,7 @@ def analyze_document_for_exam(chunks: List[Dict], max_total: int = None) -> Dict
)
prompt += f"\n### {section_name[:30]}\n{content_preview[:300]}\n"
question_limit = min(total_knowledge_points * 2, max_total if max_total else 20)
prompt += """
## 要求
根据文档内容特点,决定:
@@ -1055,10 +1056,10 @@ def analyze_document_for_exam(chunks: List[Dict], max_total: int = None) -> Dict
注意:
- 不适合的题型数量设为 0
- 所有数量之和不要超过 {min(total_knowledge_points * 2, 20)}
- 所有数量之和不要超过 %d
- 必须返回合法 JSON不要有其他内容
请直接输出 JSON"""
请直接输出 JSON""" % question_limit
try:
response = generator._call_llm(prompt)