Initial commit: Telegram bot with Cloudflare Workers
- OpenAI GPT-4o-mini with Function Calling - Cloudflare D1 for user profiles and message buffer - Sliding window (3 summaries max) for infinite context - Tools: weather, search, time, calculator - Workers AI fallback support - Webhook security with rate limiting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
20
wrangler.toml
Normal file
20
wrangler.toml
Normal file
@@ -0,0 +1,20 @@
|
||||
name = "telegram-summary-bot"
|
||||
main = "src/index.ts"
|
||||
compatibility_date = "2024-01-01"
|
||||
|
||||
[ai]
|
||||
binding = "AI"
|
||||
|
||||
[vars]
|
||||
SUMMARY_THRESHOLD = "20"
|
||||
MAX_SUMMARIES_PER_USER = "3"
|
||||
N8N_WEBHOOK_URL = "https://n8n.anvil.it.com"
|
||||
|
||||
[[d1_databases]]
|
||||
binding = "DB"
|
||||
database_name = "telegram-conversations"
|
||||
database_id = "c285bb5b-888b-405d-b36f-475ae5aed20e"
|
||||
|
||||
# Secrets (wrangler secret put 으로 설정):
|
||||
# - BOT_TOKEN: Telegram Bot Token
|
||||
# - WEBHOOK_SECRET: Webhook 검증용 시크릿
|
||||
Reference in New Issue
Block a user