digest: fall back to any successful tone variant, not just INTERMEDIATE
This commit is contained in:
parent
2462882006
commit
1fdf7d6a23
1 changed files with 6 additions and 1 deletions
|
|
@ -184,7 +184,12 @@ async def run() -> None:
|
|||
written = 0
|
||||
for u in fresh:
|
||||
tone = (u.digest_tone or "INTERMEDIATE").upper()
|
||||
content = variants.get(tone) or variants.get("INTERMEDIATE")
|
||||
# Fall back to INTERMEDIATE first (the more common tone) and then
|
||||
# to whatever variant succeeded, so an asymmetric LLM failure
|
||||
# doesn't silently skip the user.
|
||||
content = (variants.get(tone)
|
||||
or variants.get("INTERMEDIATE")
|
||||
or next(iter(variants.values()), None))
|
||||
if content is None:
|
||||
continue
|
||||
await _send_one(u, kind, content, date_str, session)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue