Refactor: remove unused cogs and services, simplify architecture

- Remove admin.py and search.py cogs
- Remove searxng.py service and rate_limiter.py utility
- Update bot.py, ai_chat.py, config.py, and ai_service.py
- Update documentation and docker-compose.yml
This commit is contained in:
2026-01-11 18:41:23 +01:00
parent 0607b05e3b
commit b05fa034a6
14 changed files with 182 additions and 801 deletions

View File

@@ -1,33 +1,55 @@
# ===========================================
# Discord Configuration
# ===========================================
# Your Discord bot token (get it from https://discord.com/developers/applications)
DISCORD_TOKEN=your_discord_bot_token_here
DISCORD_GUILD_ID= # Optional: for faster command sync during development
# ===========================================
# AI Provider Configuration
# ===========================================
# Available providers: "openai", "openrouter", "anthropic"
AI_PROVIDER=openai
# Model to use (e.g., gpt-4o, gpt-4o-mini, claude-3-5-sonnet, etc.)
AI_MODEL=gpt-4o
# Provider API Keys (set the ones you use)
# 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
# AI Settings
# Maximum tokens in AI response (100-4096)
AI_MAX_TOKENS=1024
# AI creativity/randomness (0.0 = deterministic, 2.0 = very creative)
AI_TEMPERATURE=0.7
# SearXNG Configuration
SEARXNG_BASE_URL=http://localhost:8080
SEARXNG_TIMEOUT=10
# ===========================================
# Bot Identity & Personality
# ===========================================
# The bot's name, used in the system prompt to tell the AI who it is
BOT_NAME=My Bot
# Rate Limiting
RATE_LIMIT_MESSAGES=10 # Messages per user per minute
RATE_LIMIT_SEARCHES=5 # Searches per user per minute
# Personality traits that define how the bot responds (used in system prompt)
BOT_PERSONALITY=helpful and friendly
# Logging
LOG_LEVEL=INFO
# Message shown when someone mentions the bot without saying anything
BOT_DESCRIPTION=I'm an AI assistant here to help you.
# Bot Behavior
BOT_NAME=Daemon Boyfriend
BOT_PERSONALITY=helpful, witty, and slightly mischievous
# Status message shown in Discord (displays as "Watching <BOT_STATUS>")
BOT_STATUS=for mentions
# 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
# ===========================================
# Logging
# ===========================================
# Log level: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO