- Updated docs to reflect switch to Bigrams (order 1)
- Documented incremental DB updates and performance caching
- Added mention of @-ping protection in features
- Updated AI context guidance (20 messages instead of 50)
- Fixed AI_SYSTEM_PROMPT env fallback in index.ts
- Load system prompt from data/system-prompt.txt (persistent)
- Fallback to AI_SYSTEM_PROMPT env variable
- Fallback to hardcoded default
- File can be edited without rebuilding container
- Includes default UlfBot/SchrottBot personality
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Features:
- /ai setup - Setup wizard via private chat for security
- /ai status - Show current config (API key masked)
- /ai on/off - Enable/disable AI per chat
- /ai random <1-10> - Set random trigger probability (admins)
- /ai help - Detailed help
- /ask-ai [text] - Generate AI response
Security:
- API keys only entered in private chat
- API keys masked in status display
- Admin-only configuration
Architecture:
- OpenAI-compatible client (OpenAI, Ollama, OpenRouter)
- Global system prompt (.env) + group prompt (DB)
- 50 message context per chat
- SQLite tables: ai_settings, message_context, setup_sessions
Defaults:
- AI disabled by default
- Trigger word: ask-ai
- Random probability: 1%
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>