# Telegram API credentials (get from https://my.telegram.org) TG_API_ID=123456 TG_API_HASH=your_api_hash_here # Telethon session file prefix (actual file will be .session) # In Docker/K8s you can set this to /data/telethon_session to persist it. TG_SESSION=telethon_session # Target selection — choose ONE of these (leave others blank/zero) # 1) Public username WITHOUT the leading @ TARGET_USERNAME= # 2) Numeric Telegram user ID (if they have no username) TARGET_USER_ID=0 # 3) Display name the person set for themselves (case-insensitive; exact or partial match) TARGET_DISPLAY_NAME= # Cache file where the resolved numeric ID will be stored for future runs TARGET_CACHE_FILE=target_id.txt # OpenAI configuration OPENAI_API_KEY=your_openai_api_key_here # Any chat-capable model you prefer OPENAI_MODEL=gpt-4o-mini # Human-like delay between replies (seconds) MIN_DELAY_SEC=25 MAX_DELAY_SEC=75 # History persistence HISTORY_FILE=chat_history.jsonl # Rough token budget for history passed to the model MAX_TOKENS_HISTORY=2200 # Hard cap on number of messages kept in history MAX_MESSAGES_HISTORY=30 # Optional opener (disabled by default). # When enabled, the opener is sent only on a fresh start (no history), # when a target is already resolved, and no catch-up reply was sent. AUTO_OPENER_ENABLED=false OPENER_TEXT= # Typing simulation (show "typing..." before sending) # Enable/disable typing indicator and tune how long it appears based on message length. TYPING_SIM_ENABLED=true # Approximate words per minute used to estimate typing duration (5 chars ≈ 1 word) TYPING_WPM=22 # Clamp the simulated typing duration to this range (in seconds) TYPING_MIN_SEC=2.0 TYPING_MAX_SEC=18.0 # Optional: ensure unbuffered logs in some environments PYTHONUNBUFFERED=1