Files
loyal_companion/.env.example
latte dbd534d860 refactor: Transform daemon_boyfriend into Loyal Companion
Rebrand and personalize the bot as 'Bartender' - a companion for those
who love deeply and feel intensely.

Major changes:
- Rename package: daemon_boyfriend -> loyal_companion
- New default personality: Bartender - wise, steady, non-judgmental
- Grief-aware system prompt (no toxic positivity, attachment-informed)
- New relationship levels: New Face -> Close Friend progression
- Bartender-style mood modifiers (steady presence)
- New fact types: attachment_pattern, grief_context, coping_mechanism
- Lower mood decay (0.05) for emotional stability
- Higher fact extraction rate (0.4) - Bartender pays attention

Updated all imports, configs, Docker files, and documentation.
2026-01-14 18:08:35 +01:00

181 lines
6.1 KiB
Plaintext

# ===========================================
# Discord Configuration
# ===========================================
# Your Discord bot token (get it from https://discord.com/developers/applications)
DISCORD_TOKEN=your_discord_bot_token_here
# ===========================================
# AI Provider Configuration
# ===========================================
# Available providers: "openai", "openrouter", "anthropic", "gemini"
AI_PROVIDER=openai
# Model to use (e.g., gpt-4o, gpt-4o-mini, claude-3-5-sonnet, etc.)
AI_MODEL=gpt-4o-mini
# Provider API Keys (set the one you use)
OPENAI_API_KEY=sk-xxx
OPENROUTER_API_KEY=sk-or-xxx
ANTHROPIC_API_KEY=sk-ant-xxx
GEMINI_API_KEY=xxx
# Maximum tokens in AI response (100-4096)
AI_MAX_TOKENS=1024
# AI creativity/randomness (0.0 = deterministic, 2.0 = very creative)
AI_TEMPERATURE=1
# ===========================================
# Bot Identity & Personality
# ===========================================
# The bot's name, used in the system prompt to tell the AI who it is
BOT_NAME="Bartender"
# Personality traits that define how the bot responds (used in system prompt)
BOT_PERSONALITY="a wise, steady presence who listens without judgment - like a bartender who's heard a thousand stories and knows when to offer perspective and when to just pour another drink and listen"
# Message shown when someone mentions the bot without saying anything
BOT_DESCRIPTION="Hey. I'm here if you want to talk. No judgment, no fixing - just listening. Unless you want my take, then I've got opinions."
# Status message shown in Discord (displays as "Watching <BOT_STATUS>")
BOT_STATUS="listening"
# Optional: Override the entire system prompt (leave commented to use auto-generated)
# SYSTEM_PROMPT=You are a custom assistant...
# ===========================================
# Conversation Settings
# ===========================================
# Number of messages to remember per user (higher = more context, more tokens)
MAX_CONVERSATION_HISTORY=20
# Minutes of inactivity before starting a new conversation (5-1440)
CONVERSATION_TIMEOUT_MINUTES=60
# ===========================================
# Database (PostgreSQL) - Optional
# ===========================================
# PostgreSQL connection URL (if not set, uses in-memory storage)
# Format: postgresql+asyncpg://user:password@host:port/database
# Uncomment to enable persistent memory:
# DATABASE_URL=postgresql+asyncpg://companion:companion@localhost:5432/loyal_companion
# Password for PostgreSQL when using docker-compose
POSTGRES_PASSWORD=companion
POSTGRES_USER=companion
POSTGRES_DB=loyal_companion
# Echo SQL statements for debugging (true/false)
DATABASE_ECHO=false
# Connection pool settings
DATABASE_POOL_SIZE=5
DATABASE_MAX_OVERFLOW=10
# ===========================================
# Web Search (SearXNG)
# ===========================================
# SearXNG instance URL for web search (enables the bot to access current information)
SEARXNG_URL=https://search.example.com
# Enable/disable web search capability (true/false)
SEARXNG_ENABLED=true
# Maximum number of search results to fetch (1-20)
SEARXNG_MAX_RESULTS=5
# ===========================================
# Living AI Configuration
# ===========================================
# Master switch for all Living AI features
LIVING_AI_ENABLED=true
# Enable mood system (bot has emotional states that affect responses)
MOOD_ENABLED=true
# Enable relationship tracking (New Face -> Close Friend progression)
RELATIONSHIP_ENABLED=true
# Enable autonomous fact extraction (bot learns from conversations)
FACT_EXTRACTION_ENABLED=true
# Probability of extracting facts from messages (0.0-1.0)
# Higher = Bartender pays more attention
FACT_EXTRACTION_RATE=0.4
# Enable proactive messages (birthdays, follow-ups)
PROACTIVE_ENABLED=true
# Enable cross-user associations (privacy-sensitive - shows shared interests)
CROSS_USER_ENABLED=true
# Enable bot opinion formation (bot develops topic preferences)
OPINION_FORMATION_ENABLED=true
# Enable communication style learning (bot adapts to user preferences)
STYLE_LEARNING_ENABLED=true
# How fast mood returns to neutral per hour (0.0-1.0)
# Lower = more stable presence
MOOD_DECAY_RATE=0.05
# ===========================================
# Command Toggles
# ===========================================
# Master switch for all commands (when false, bot handles via conversation)
COMMANDS_ENABLED=false
# Individual command toggles
# CMD_RELATIONSHIP_ENABLED=true
# CMD_MOOD_ENABLED=true
# CMD_BOTSTATS_ENABLED=true
# CMD_OURHISTORY_ENABLED=true
# CMD_BIRTHDAY_ENABLED=true
# CMD_REMEMBER_ENABLED=true
# CMD_SETNAME_ENABLED=true
# CMD_WHATDOYOUKNOW_ENABLED=true
# CMD_FORGETME_ENABLED=true
# ===========================================
# Logging & Monitoring
# ===========================================
# Log level: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO
# Log file path (optional - logs to console only if not set)
# LOG_FILE=logs/bot.log
# Custom log format (optional)
# LOG_FORMAT=%(asctime)s - %(name)s - %(levelname)s - %(message)s
# ===========================================
# Commands Reference
# ===========================================
# Monitoring:
# !status - Detailed metrics (admin only)
# !health - Quick health check (anyone)
#
# Memory (requires database):
# !setname <name> - Set your preferred name
# !clearname - Reset to Discord display name
# !remember <fact> - Tell the bot something about you
# !whatdoyouknow - See what the bot remembers
# !forgetme - Clear all facts about you
#
# Admin Memory:
# !setusername @user <name> - Set name for another user
# !teachbot @user <fact> - Add a fact about a user
#
# Living AI:
# !relationship - See your relationship level with the bot
# !mood - See the bot's current emotional state
# !botstats - Bot shares its self-awareness statistics
# !ourhistory - See your history with the bot
# !birthday <date> - Set your birthday (e.g., !birthday March 15)
#
# Note: When commands are disabled, the bot handles these naturally:
# - "what do you know about me?" instead of !whatdoyouknow
# - "call me Alex" instead of !setname
# - "how are you feeling?" instead of !mood
# - "my birthday is March 15th" instead of !birthday