Commit Graph

31 Commits

Author SHA1 Message Date
3d939201f0 Merge pull request 'dev' (#17) from dev into main
Reviewed-on: MSC/Daemon-Boyfriend#17
2026-01-13 18:38:48 +00:00
f139062d29 Merge pull request 'added technical documentation' (#15) from fix/testing-and-docs into dev
Reviewed-on: MSC/Daemon-Boyfriend#15
2026-01-13 17:47:32 +00:00
b29822efc7 added technical documentation 2026-01-13 17:20:52 +00:00
ff394c9250 fix: Make tests pass and update documentation
- Fix config.py to ignore extra environment variables (docker-compose compatibility)
- Create PortableJSON type for SQLite/PostgreSQL compatibility in tests
- Replace JSONB and ARRAY types with PortableJSON in models
- Add ensure_utc() helper to handle timezone-naive datetimes from SQLite
- Fix timezone issues in mood_service, relationship_service, and self_awareness_service
- Fix duplicate code in test_providers.py
- Update CLAUDE.md with comprehensive Living AI documentation
- Add testing section with commands and setup details
- All 112 tests now pass successfully
2026-01-13 14:59:46 +00:00
bfd42586df Merge pull request 'feature/living-ai' (#11) from feature/living-ai into main
Reviewed-on: MSC/Daemon-Boyfriend#11
v1.5
2026-01-12 20:08:14 +00:00
d371fb77cf quick adding (not working) 2026-01-12 20:41:04 +01:00
743bed67f3 quick fix 2026-01-12 20:30:59 +01:00
bf01724b3e docs: Update README, .env.example, and .gitignore for Living AI
- Add Living AI features overview to README
- Document all Living AI configuration options
- Add Living AI command toggles documentation
- Add new Living AI commands (!relationship, !mood, etc.)
- Update project structure to include new services
- Add Living AI settings to .env.example
- Add command toggles to .env.example
- Update commands reference with Living AI commands
- Add database files to .gitignore
2026-01-12 20:06:29 +01:00
0d43b5b29a feat: Implement Living AI system
Complete implementation of the Living AI features:

Phase 1 - Foundation:
- MoodService: Valence-arousal mood model with time decay
- RelationshipService: Stranger→Close Friend progression
- Enhanced system prompt with personality modifiers

Phase 2 - Autonomous Learning:
- FactExtractionService: AI-powered fact extraction from conversations
- Rate-limited extraction (configurable, default 30%)
- Deduplication and importance scoring

Phase 3 - Personalization:
- CommunicationStyleService: Learn user preferences
- OpinionService: Bot opinion formation on topics
- SelfAwarenessService: Bot statistics and self-reflection

Phase 4 - Proactive Features:
- ProactiveService: Scheduled events (birthdays, follow-ups)
- Event detection from conversations
- Recurring event support

Phase 5 - Social Features:
- AssociationService: Cross-user memory connections
- Shared interest discovery
- Connection suggestions

New database tables:
- bot_states, bot_opinions, user_relationships
- user_communication_styles, scheduled_events
- fact_associations, mood_history

Configuration:
- Living AI feature toggles
- Individual command enable/disable
- All features work naturally through conversation when commands disabled
2026-01-12 19:51:48 +01:00
7d2fab57c4 change default ai model to mini v1.0 2026-01-12 17:36:28 +00:00
94abdca2f7 Replace Alembic with plain SQL schema
- Fix scalar_first() bug in persistent_conversation.py (use scalars().first())
- Add schema.sql with all 7 tables (users, user_preferences, user_facts, guilds, guild_members, conversations, messages)
- Update database.py to run schema.sql on startup
- Remove Alembic directory and configuration
- Remove alembic from requirements.txt
2026-01-12 18:30:55 +01:00
707410e2ce update 2026-01-12 18:23:56 +01:00
1c5e9d3f45 Fix .env.example: comment out DATABASE_URL, add all settings and commands reference 2026-01-12 17:34:20 +01:00
6b2a253573 Add database configuration to .env.example 2026-01-12 15:33:08 +01:00
3d5aa0b76b Update README with PostgreSQL memory system documentation 2026-01-12 14:02:25 +01:00
e00d4fd501 Add PostgreSQL memory system for persistent user and conversation storage
- Add PostgreSQL database with SQLAlchemy async support
- Create models: User, UserFact, UserPreference, Conversation, Message, Guild, GuildMember
- Add custom name support so bot knows 'who is who'
- Add user facts system for remembering things about users
- Add persistent conversation history that survives restarts
- Add memory commands cog (!setname, !remember, !whatdoyouknow, !forgetme)
- Add admin commands (!setusername, !teachbot)
- Set up Alembic for database migrations
- Update docker-compose with PostgreSQL service
- Gracefully falls back to in-memory storage when DB not configured
2026-01-12 14:00:06 +01:00
853e7c9fcd Add monitoring, metrics tracking, and enhanced logging
- Add BotMonitor class for tracking requests, errors, and health status
- Track request success/failure, response times, error rates
- Add !status command (admin) for detailed metrics with embed
- Add !health command (anyone) for quick health check
- Add rotating file logging support (LOG_FILE config)
- Auto-detect unhealthy status when errors exceed threshold
- Record errors with timestamps and context for debugging
2026-01-11 21:04:49 +01:00
7e26adc7a7 Display error details and tech wizard notice on errors
- Show actual error message in code block for debugging
- Add 'tech wizard needs to take a look' notice
- Content policy violations don't show tech notice (user issue)
2026-01-11 21:01:50 +01:00
bd73fe68ce Add image/GIF sending support in bot responses
- Extract image URLs from AI responses
- Send images as Discord embeds
- Support standalone URLs and markdown image syntax
- Clean image URLs from text to avoid duplication
- Handle multiple images in a single response
2026-01-11 21:00:36 +01:00
1f6e792fa3 Add user-friendly error messages for API errors
- Detect credit/quota exhaustion and show helpful message
- Handle authentication errors gracefully
- Handle model not found errors
- Handle content policy violations
- Fall back to generic error for unknown issues
2026-01-11 20:58:08 +01:00
4ac123be9c Add image and GIF vision support
- Add ImageAttachment dataclass for image metadata
- Update Message to support list of image attachments
- Update all providers (OpenAI, Anthropic, Gemini, OpenRouter) for vision
- Extract images from Discord attachments and embeds in ai_chat.py
- Supports PNG, JPEG, GIF, and WebP formats
2026-01-11 20:56:50 +01:00
8f521b869b Add user context for mentioned users in messages
- Bot now knows who is talking to it (display name, username, nickname)
- Bot recognizes other users mentioned in messages
- Includes user's display name, username, nickname, and top role
- Context is added to system prompt for AI awareness
2026-01-11 20:53:16 +01:00
1e2e6b0327 Merge pull request 'Add SearXNG web search for current information' (#8) from feature/internet-access into main
Reviewed-on: MSC/Daemon-Boyfriend#8
2026-01-11 19:51:41 +00:00
6a9b6fdda2 Add SearXNG web search for current information
- Add searxng.py service for web queries via SearXNG API
- Integrate search into ai_chat.py with AI-driven search decisions
- AI determines if query needs current info, then searches automatically
- Add SEARXNG_URL, SEARXNG_ENABLED, SEARXNG_MAX_RESULTS config options
- Update documentation in README.md, CLAUDE.md, and .env.example
2026-01-11 20:49:20 +01:00
c5c42c8701 Merge pull request 'feature/google-gemini-provider' (#5) from feature/google-gemini-provider into main
Reviewed-on: MSC/Daemon-Boyfriend#5
2026-01-11 19:41:09 +00:00
bdcdaeeac0 adding workflow 2026-01-11 20:29:59 +01:00
5761529c7f Add Google Gemini as AI provider
- Add gemini.py provider using google-genai SDK
- Update config.py with gemini provider and GEMINI_API_KEY
- Update ai_service.py factory to support gemini
- Add google-genai to requirements.txt
- Update .env.example, README.md, and CLAUDE.md documentation
2026-01-11 20:23:03 +01:00
b05fa034a6 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
2026-01-11 18:41:23 +01:00
0607b05e3b added claude 2026-01-10 21:49:29 +01:00
561f1a8fb1 first commit 2026-01-10 21:46:27 +01:00
d00593415d Initial commit 2026-01-10 20:20:10 +00:00