在 Hugging Face 的 Settings -> Variables and secrets 頁面,請確保填入以下所有變數。 On the Hugging Face Settings -> Variables and secrets page, please ensure you fill in all the following variables.
| 變數名稱 / Variable Name | 範例/說明 (Example/Description) |
|---|---|
API_ID |
Telegram API ID (從 / from my.telegram.org 獲取 / get) |
API_HASH |
Telegram API Hash (從 / from my.telegram.org 獲取 / get) |
TELEGRAM_BOT_TOKEN |
機器人 Token (從 / from @BotFather 獲取 / get) |
TELEGRAM_CHAT_ID |
你的檔案存儲群組 ID (以 -100 開頭) / Your storage group ID (starts with -100) |
DB_TYPE |
postgresql |
DB_HOST |
Supabase Pooler 主機網址 (Port 6543 那個) / Supabase Pooler host URL (the one with port 6543) |
DB_USER |
Supabase 用戶名 / username (postgres.xxxx) |
DB_PASSWORD |
你的 Supabase 資料庫密碼 / Your Supabase database password |
DB_PORT |
6543 |
DB_NAME |
postgres |
ADMIN_USERNAME |
網頁登入帳號 / Web login username (例如 / e.g.: admin) |
ADMIN_PASSWORD |
網頁登入密碼 / Web login password |
| 變數名稱 / Variable Name | 預設值 / 說明 (Default / Description) |
|---|---|
USE_TG_OFFICIAL_THUMBNAIL |
FALSE (設為 / set to TRUE 則使用官方縮圖,省效能 / to use official thumbnails and save resources) |
CACHE_MAX_AGE_MINUTES |
10 (快取在伺服器保留的分鐘數 / Minutes to keep cache on server) |
THUMBNAIL_WIDTH |
720 |
THUMBNAIL_HEIGHT |
720 |
MONITORED_CHAT_ID |
要自動監聽的群組 ID,用逗號分隔 / Group IDs to monitor automatically, separated by commas |
💡 提醒 / Reminder:每次在 HF 更改 Secrets 後,Space 都會自動重啟一次。 Every time you change Secrets on HF, the Space will automatically restart once.