Files
loneliness-bot/.env.example
2026-07-15 14:23:05 +07:00

36 lines
1.1 KiB
Plaintext

# Telegram bot token from @BotFather.
BOT_TOKEN=123456:replace-me
# OpenAI-compatible API settings.
# Use the API root only. Do not include /chat/completions; the SDK adds it.
# OpenRouter example: https://openrouter.ai/api/v1
API_BASE_URL=https://api.openai.com/v1
API_TOKEN=sk-replace-me
MODEL=gpt-4o-mini
# Optional proxy used for both Telegram API and OpenAI-compatible API.
# Supports HTTP and SOCKS URLs when aiohttp-socks is installed.
# TELEGRAM_PROXY=socks5://user:pass@127.0.0.1:1080
TELEGRAM_PROXY=
# Comma-separated Telegram user IDs allowed to use the bot.
# Example: 123456789,987654321
WHITELIST_USER_IDS=
# System prompt is intentionally read from a local text file, not .env.
SYSTEM_PROMPT_PATH=config/system_prompt.txt
# API hardening knobs.
API_TIMEOUT_SECONDS=60
API_MAX_RETRIES=2
MAX_PROMPT_CHARS=12000
MAX_RESPONSE_CHARS=3900
# SQLite context storage.
DATABASE_PATH=data/bot.sqlite3
MAX_CONTEXT_MESSAGES=20
# Wait this long before sending to the model so fast consecutive Telegram
# messages from one user are batched as separate message entries.
MESSAGE_BATCH_DELAY_SECONDS=3