feat: init AI email summarization bot

- Multi-account IMAP email polling with UID tracking
- DeepSeek API integration with JSON Mode structured output
- Telegram notification with formatted MarkdownV2 message
- YAML config with dataclass-based type validation
- Graceful shutdown on SIGINT/SIGTERM
- 60s default polling interval
This commit is contained in:
2026-07-02 19:45:34 +08:00
commit e2826a3e3b
11 changed files with 364 additions and 0 deletions

22
config.yaml.example Normal file
View File

@@ -0,0 +1,22 @@
email_accounts:
- imap_server: "imap.gmail.com"
imap_port: 993
username: "your_email@gmail.com"
password: "your_app_password"
- imap_server: "imap.qq.com"
imap_port: 993
username: "your_email@qq.com"
password: "your_authorization_code"
ai:
api_key: "sk-your_deepseek_api_key"
model: "deepseek-chat"
base_url: "https://api.deepseek.com"
telegram:
bot_token: "1234567890:ABCdefGHIjklmNOPqrstUVwxyz"
chat_id: "123456789"
polling:
interval_seconds: 60