feat(server-release): 出题批阅业务逻辑优化 — 移除20题限制、max_total支持、填空题格式校验、修正认证状态码

- exam_pkg/api.py: 移除总题数20道上限,改为50道警告;修正认证错误使用正确的UNAUTHORIZED/FORBIDDEN状态码;端点保持同步模式
- exam_pkg/generator.py: AI智能出题prompt支持max_total参数
- exam_pkg/grader.py: 填空题增加学生答案格式校验(列表类型+字符串元素)
This commit is contained in:
User
2026-07-03 12:03:46 +08:00
parent 4a262728b1
commit c709360c7c
3 changed files with 35 additions and 11 deletions

View File

@@ -1055,7 +1055,7 @@ def analyze_document_for_exam(chunks: List[Dict], max_total: int = None) -> Dict
注意:
- 不适合的题型数量设为 0
- 所有数量之和不要超过 {min(total_knowledge_points * 2, 20)}
- 所有数量之和不要超过 {min(total_knowledge_points * 2, max_total if max_total else 20)}
- 必须返回合法 JSON不要有其他内容
请直接输出 JSON"""