Files
ulfbot/.env.example
sarah 3b310d612d
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 30s
Add KI/LLM integration with OpenAI-compatible API support
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

7 lines
300 B
Plaintext

BOT_TOKEN=your_telegram_bot_token_here
# KI/LLM Settings (optional)
AI_DEFAULT_API_KEY=your_openai_api_key
AI_DEFAULT_BASE_URL=https://api.openai.com/v1
AI_DEFAULT_MODEL=gpt-4o-mini
AI_SYSTEM_PROMPT=Du bist ein freundlicher Chat-Bot in einer Telegram-Gruppe. Antworte kurz und prägnant auf Deutsch.