feat: show recipient & AI-generated subject in summary
- AI now generates a concise subject title (not copy original) - AI prompt includes recipient field in JSON schema - Telegram message shows recipient and uses AI-generated title
This commit is contained in:
@@ -29,7 +29,8 @@ def _process_account(cfg: Config, acct):
|
||||
for mail in emails:
|
||||
try:
|
||||
logger.info(f" 正在摘要: {mail.subject}")
|
||||
summary = summarize_email(cfg.ai, mail.subject, mail.sender, mail.body)
|
||||
summary = summarize_email(cfg.ai, acct.username, mail.subject, mail.sender, mail.body)
|
||||
summary["recipient"] = acct.username
|
||||
text = format_summary(summary)
|
||||
send_message(cfg.telegram, text)
|
||||
seen_uids.append(mail.uid)
|
||||
|
||||
Reference in New Issue
Block a user