This guide covers all configuration options for AircBot. Copy .env.example to .env and modify as needed.
cp .env.example .env
# Edit .env with your settingsIRC_SERVER- IRC server address (default: irc.libera.chat)IRC_PORT- IRC server port (default: 6667)IRC_NICKNAME- Bot's nicknameIRC_CHANNEL- Channel to join (include # prefix)IRC_PASSWORD- Bot's password (if required)IRC_USE_SSL- Enable SSL connection (true/false)IRC_SSL_VERIFY- Verify SSL certificates (false for self-signed)
DISCORD_TOKEN- Your Discord bot token (required for Discord bot)DISCORD_GUILD_ID- Optional: Specific server ID to restrict bot toDISCORD_CHANNEL_ID- Optional: Specific channel ID to restrict bot to
Configure which AI service to use:
# Use only local AI (Ollama) - Free, private, fast
LLM_MODE=local_only
# Use only OpenAI API - Reliable, costs money
LLM_MODE=openai_only
# Try local first, fallback to OpenAI if needed - Best of both worlds
LLM_MODE=fallbackLLM_ENABLED- Enable local LLM features (true/false)LLM_BASE_URL- API endpoint (e.g., http://localhost:11434/v1 for Ollama)LLM_API_KEY- API key (use "ollama" for local Ollama)LLM_MODEL- Model name (e.g., deepseek-r1:latest)LLM_MAX_TOKENS- Maximum response length (default: 150)LLM_TEMPERATURE- Creativity level 0.0-1.0 (default: 0.7)LLM_RETRY_ATTEMPTS- Number of retries for empty LLM responses (default: 3)
🔐 IMPORTANT: Set your OpenAI API key in your environment for security:
export OPENAI_API_KEY="sk-your-api-key-here"OPENAI_ENABLED- Enable OpenAI API features (auto-enabled when API key is found)OPENAI_MODEL- OpenAI model to use (e.g., gpt-3.5-turbo, gpt-4)OPENAI_MAX_TOKENS- Maximum response length for OpenAI (default: 150)OPENAI_TEMPERATURE- Creativity level for OpenAI 0.0-1.0 (default: 0.7)OPENAI_DAILY_LIMIT- Maximum OpenAI API calls per day for cost control (default: 100)
When using LLM_MODE=fallback, the bot can use advanced AI-powered response quality evaluation:
# Enable intelligent fallback decisions (requires: pip install sentence-transformers)
SEMANTIC_SIMILARITY_ENABLED=true
SEMANTIC_SIMILARITY_MIN_THRESHOLD=0.3The bot will:
- Try local AI first (faster, free, private)
- If local AI gives a poor response, automatically fall back to OpenAI
- Use semantic similarity to detect when responses miss the point, not just keyword matching
For complete fallback configuration options, see Fallback Configuration Guide.
Customize the bot's personality and response style:
# Enable personality prompts
PERSONALITY_ENABLED=true
PERSONALITY_PROMPT_FILE=personality_prompt.txt
# Create personality file
echo "Respond in a helpful but concise manner." > personality_prompt.txtThe bot includes advanced privacy filtering:
# Privacy settings
PRIVACY_FILTER_ENABLED=true
PRIVACY_LEVEL=medium # none, low, medium, high, paranoid
PRIVACY_USERNAME_ANONYMIZATION=true
PRIVACY_PII_DETECTION=trueFor complete privacy configuration, see Privacy Filter Guide.
DATABASE_PATH- Path to SQLite database file (default: data/links.db)
RATE_LIMIT_USER_PER_MINUTE- Max requests per user per minute (default: 1)RATE_LIMIT_TOTAL_PER_MINUTE- Max total requests per minute (default: 10)
LINKS_RECENT_LIMIT- Number of links shown by!linkscommand (default: 5)LINKS_SEARCH_LIMIT- Number of links shown by!links searchcommand (default: 3)LINKS_DETAILS_LIMIT- Number of links shown by!links detailscommand (default: 5)LINKS_BY_USER_LIMIT- Number of links shown by!links by <user>command (default: 3)
ADMIN_USERS- Comma-separated list of admin usernames (default: bot nickname)
LLM_MODE=local_only
LLM_ENABLED=true
LLM_BASE_URL=http://localhost:11434/v1
LLM_MODEL=deepseek-r1:latest
OPENAI_ENABLED=false
SEMANTIC_SIMILARITY_ENABLED=falseLLM_MODE=openai_only
LLM_ENABLED=false
OPENAI_ENABLED=true
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_DAILY_LIMIT=100
SEMANTIC_SIMILARITY_ENABLED=falseLLM_MODE=fallback
LLM_ENABLED=true
LLM_BASE_URL=http://localhost:11434/v1
LLM_MODEL=deepseek-r1:latest
OPENAI_ENABLED=true
OPENAI_MODEL=gpt-3.5-turbo
SEMANTIC_SIMILARITY_ENABLED=true
SEMANTIC_SIMILARITY_MIN_THRESHOLD=0.3- Fallback Configuration Guide - Complete fallback system configuration
- Privacy Filter Guide - Privacy protection settings
- Performance and Monitoring - Performance tuning and monitoring
For configuration questions:
- Check the relevant documentation guides linked above
- Review the
.env.examplefile for all available options - Run the test suite to validate your configuration
- Check the logs for configuration errors on startup