Commit Graph

14 Commits

Author SHA1 Message Date
7345fb68c7 Fix: Allow system-prompt.txt in Docker build context
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 13s
2026-05-14 13:40:53 +02:00
e49bd060d2 Docs: Update README and CLAUDE.md for recent architecture changes
Some checks failed
Auto Build and Push Docker Image / build (push) Failing after 46s
- 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
2026-05-14 13:38:23 +02:00
cb70812739 Refactor: Optimize DB performance, reduce repetitions, and add @-ping protection
- Optimized Markov chain storage: Switched from full rewrites to incremental DB updates.
- Improved AI creativity: Reduced repetitions using presence/frequency penalties and prompt tuning.
- Increased Markov randomness: Lowered order to 1 and enabled learning of special characters/emojis.
- Added @-ping protection: Automatically strips '@' symbols from AI and Markov responses.
- Enhanced robustness: Added startup token checks, directory auto-creation, and admin/bot-info caching.
2026-05-14 13:35:45 +02:00
9111d46a0e Bundle system-prompt.txt and copy to persistent volume on startup
Some checks failed
Auto Build and Push Docker Image / build (push) Failing after 8s
- Include SchrottBot personality as bundled default
- Copy to data/ on first startup (persistent, editable)
- Load from persistent location after first run
- Changes survive container rebuilds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 11:07:29 +01:00
8db683470a Remove pre-created system-prompt.txt (auto-generated on startup)
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 8s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 10:59:52 +01:00
64b2a95d57 Auto-create system-prompt.txt on startup
- Creates data/system-prompt.txt with default SchrottBot personality
- Ensures persistent directory exists
- Group prompt is empty by default (no preset)
- Can be customized per group via /ai setup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 10:58:13 +01:00
cfa281e676 Load system prompt from persistent file
- 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>
2026-03-24 10:54:36 +01:00
cffc818dd9 Add all environment variables to docker-compose
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 8s
Pass all .env settings to container:
- AI_DEFAULT_API_KEY
- AI_DEFAULT_BASE_URL
- AI_DEFAULT_MODEL
- AI_SYSTEM_PROMPT

With sensible defaults for optional values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 10:47:54 +01:00
3b310d612d Add KI/LLM integration with OpenAI-compatible API support
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 30s
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>
2026-03-24 10:40:51 +01:00
42b2971cd8 Add Node.js setup and build steps to workflows
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 42s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 20:20:38 +01:00
8535dc14ca Fix .dockerignore to include dist/ for Docker build
Some checks failed
Auto Build and Push Docker Image / build (push) Failing after 4s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 20:16:53 +01:00
470a1dc6a8 Add .gitattributes to enforce LF line endings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 20:15:46 +01:00
0d8f68634c Add Gitea Actions workflows for Docker image builds
Some checks failed
Auto Build and Push Docker Image / build (push) Failing after 4s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 20:14:45 +01:00
4c2df27527 first commit 2026-03-23 20:11:18 +01:00