fix(tools-pve/asr-pipeline): mount gitea ssh key for Obsidian vault sync and fix provider source_detail
This commit is contained in:
@@ -377,9 +377,13 @@ def write_draft(cleaned: str, meta: dict, context: str, date: str,
|
||||
if ctx:
|
||||
ctx = "本场背景(来自既有笔记与长期记忆;引用其中内容时必须按上面第 3 条加 〔背景〕):\n" \
|
||||
+ context
|
||||
detail = SOURCE_DETAIL.get(meta.get("backend", ""), "ASR")
|
||||
backend = meta.get("backend") or meta.get("asr_provider") or ""
|
||||
model_name = meta.get("asr_model") or ""
|
||||
detail = SOURCE_DETAIL.get(backend, "ASR")
|
||||
if model_name and backend in ("soniox", "gemini", "openai", "grok") and model_name not in detail:
|
||||
detail = f"{detail} ({model_name})"
|
||||
prompt = prompts.DRAFT_PROMPT.format(
|
||||
speaker_note=prompts.SPEAKER_NOTE.get(meta.get("backend", ""), ""),
|
||||
speaker_note=prompts.SPEAKER_NOTE.get(backend, ""),
|
||||
context=ctx, date=date, source_detail=detail,
|
||||
transcript=transcript_path, extra_fm=extra, body=cleaned)
|
||||
return chat(CFG.draft_model, prompt, max_tokens=12000, usage=usage)
|
||||
|
||||
Reference in New Issue
Block a user