feat: handle Reply-To header, add account_email field, decode address headers

This commit is contained in:
earthjasonlin committed 2026-07-02 22:37:15 +08:00 Verified
1 parent d7daddf491
commit c684090b9c
4 files changed
+43 -14

No files matched your search

+2 -2
View File
@@ -38,10 +38,10 @@ SYSTEM_PROMPT = """你是一个邮件摘要助手。请分析邮件内容并以
@retry()
def summarize_email(ai_cfg: AIConfig, recipient: str, subject: str, sender: str, body: str) -> dict[str, Any]:
def summarize_email(ai_cfg: AIConfig, recipient: str, subject: str, sender: str, body: str, account: str = "") -> dict[str, Any]:
body_preview = body[:80].replace("\n", " ")
logger.info("AI 摘要请求: sender=%s subject=%s body_preview=%s", sender, subject, body_preview)
content = f"收件人: {recipient}\n发件人: {sender}\n主题: {subject}\n正文:\n{body[:4000]}"
content = f"收件人: {recipient}\n发件人: {sender}\n主题: {subject}\n账号: {account}\n正文:\n{body[:4000]}"
payload = {
"model": ai_cfg.model,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.