fix(srt): add disable_reasoning parameter for ASR correction and include title in archive filename
PR Test / lint (pull_request) Successful in 1s

- SimpleAIClient: Add disable_reasoning parameter to control AI thinking mode
- ASRCorrector: Use disable_reasoning=True to get direct correction results
- ArchiveProcessor: Extract title from frontmatter and include in filename

File naming format: {YYYYMMDD}_{content_id}_{title}_analysis.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-21 22:19:14 +08:00
parent 9e007432eb
commit 4d2645876b
4 changed files with 176 additions and 10 deletions
+2 -1
View File
@@ -100,7 +100,8 @@ class ASRCorrector:
"""
try:
prompt = CORRECTION_PROMPT.format(text=text)
result = self.ai_client.generate(prompt, max_tokens=len(text) + 500)
# ASR 纠错需要直接结果,不需要 AI 的分析过程,因此禁用思考模式
result = self.ai_client.generate(prompt, max_tokens=len(text) + 500, disable_reasoning=True)
return result.strip()
except Exception as e:
logger.warning(f"ASR correction failed: {e}, returning original text")