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:
@@ -17,10 +17,6 @@ class Settings(BaseSettings):
|
||||
|
||||
# Discord Configuration
|
||||
discord_token: str = Field(..., description="Discord bot token")
|
||||
discord_guild_id: int | None = Field(
|
||||
None, description="Test guild ID for faster command sync during development"
|
||||
)
|
||||
command_prefix: str = Field("!", description="Legacy command prefix")
|
||||
|
||||
# AI Provider Configuration
|
||||
ai_provider: Literal["openai", "openrouter", "anthropic"] = Field(
|
||||
@@ -35,25 +31,31 @@ class Settings(BaseSettings):
|
||||
openrouter_api_key: str | None = Field(None, description="OpenRouter API key")
|
||||
anthropic_api_key: str | None = Field(None, description="Anthropic API key")
|
||||
|
||||
# SearXNG Configuration
|
||||
searxng_base_url: str = Field(
|
||||
"http://localhost:8080", description="SearXNG instance URL"
|
||||
)
|
||||
searxng_timeout: int = Field(10, description="Search timeout in seconds")
|
||||
|
||||
# Rate Limiting
|
||||
rate_limit_messages: int = Field(10, description="Messages per user per minute")
|
||||
rate_limit_searches: int = Field(5, description="Searches per user per minute")
|
||||
|
||||
# Logging
|
||||
log_level: str = Field("INFO", description="Logging level")
|
||||
|
||||
# Bot Behavior
|
||||
bot_name: str = Field("Daemon Boyfriend", description="Bot display name")
|
||||
# Bot Identity
|
||||
bot_name: str = Field("AI Bot", description="Bot display name")
|
||||
bot_personality: str = Field(
|
||||
"helpful, witty, and slightly mischievous",
|
||||
"helpful and friendly",
|
||||
description="Bot personality description for system prompt",
|
||||
)
|
||||
bot_description: str = Field(
|
||||
"I'm an AI assistant here to help you.",
|
||||
description="Bot description shown when mentioned without a message",
|
||||
)
|
||||
bot_status: str = Field(
|
||||
"for mentions",
|
||||
description="Bot status message (shown as 'Watching ...')",
|
||||
)
|
||||
|
||||
# System Prompt (optional override)
|
||||
system_prompt: str | None = Field(
|
||||
None,
|
||||
description="Custom system prompt. If not set, a default is generated from bot_name and bot_personality",
|
||||
)
|
||||
|
||||
# Conversation Settings
|
||||
max_conversation_history: int = Field(
|
||||
20, description="Max messages to keep in conversation memory per user"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user