sync: 同步服务器最新代码 (2026-01-27)
Some checks failed
continuous-integration/drone/push Build is failing

更新内容:
- 后端 AI 服务优化(能力分析、知识点解析等)
- 前端考试和陪练界面更新
- 修复多个 prompt 和 JSON 解析问题
- 更新 Coze 语音客户端
This commit is contained in:
111
2026-01-27 10:03:28 +08:00
parent fcef140d1a
commit 442ac78b56
28 changed files with 324 additions and 121 deletions

View File

@@ -256,6 +256,16 @@ def _preprocess_text(text: str) -> str:
# 移除零宽字符
text = re.sub(r'[\u200b\u200c\u200d\ufeff]', '', text)
# 【重要】先替换中文标点为英文标点(在找边界之前做,否则中文引号会破坏边界检测)
cn_punctuation = {
'': ',', '': '.', '': ':', '': ';',
'"': '"', '"': '"', ''': "'", ''': "'",
'': '[', '': ']', '': '(', '': ')',
'': '{', '': '}',
}
for cn, en in cn_punctuation.items():
text = text.replace(cn, en)
# 提取 Markdown 代码块
patterns = [
r'```json\s*([\s\S]*?)\s*```',
@@ -705,3 +715,4 @@ def clean_llm_output(text: str) -> Tuple[str, List[str]]: