Commit Graph
12 Commits
Author SHA1 Message Date
Suppai_NekoandClaude Sonnet 4.6 d53835bb5f Add send_image tool, fix Qwen no-user-query errors, prevent model contention
- Add send_image tool: fetches image from URL and posts it inline in Discord chat
- Harden _ensure_user_tail: inject/fix user message whenever last message is
  not a non-empty user message (catches empty content from stripped thinking tags)
- Fix life sim: fallback chain for empty thinking-tag-stripped responses so user
  messages are never empty; add _ensure_user_tail before each LLM call
- Add _agent_active flag: background tasks skip when run_agent is active,
  preventing model contention when two different models are configured
- Add reload_personality tool, fetch_url improvements, misc system prompt updates
- Persist channel_history.json via docker-compose volume

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 21:24:25 -07:00
Suppai_NekoandDadBot c0f0856501 Add fetch_url tool for reading webpage content
Bot can now fetch and read the text content of URLs shared in chat.
Uses httpx for async HTTP and BeautifulSoup to strip HTML noise.
Output is capped at 8000 chars to avoid blowing the context window.

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-25 16:58:29 -07:00
Suppai_NekoandDadBot 495b7aaaba Persist channel history, add fetch_channel_history tool, fix Qwen tool-use reliability
- Persist per-channel rolling history to disk (channel_history.json) so
  context survives bot restarts
- Add fetch_channel_history tool so the bot can pull Discord channel history
  on demand when it needs more context (e.g. first mention in a channel)
- Add _ensure_user_tail() called proactively before every LLM call to
  prevent Qwen "No user query found" template errors after tool results
- Set tool_choice="required" on the first agent call to guarantee the bot
  always uses a tool before replying; subsequent calls use "auto"

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-25 16:53:32 -07:00
Suppai_NekoandDadBot 02267f0059 Merge experimental into master
Co-Authored-By: DadBot <dadbot@localhost>
2026-03-25 14:52:30 -07:00
Suppai_NekoandDadBot ae49591735 Add README
Co-Authored-By: DadBot <dadbot@localhost>
2026-03-25 14:50:51 -07:00
Suppai_NekoandDadBot a596609d7a Natural message pacing based on word count, misc bot.py updates
- Replace character-based send delay with word-count/15s for natural typing pacing
- Add life simulation, topic exploration, image attachment support
- Add READ_LIFE_HISTORY_TOOL and reflection topic picking
- Retry logic for transient LLM errors (Qwen template quirks)

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-25 14:49:24 -07:00
Suppai_NekoandDadBot 1a82ac19f6 Resolve user mentions to display names before passing to LLM
Replace <@USER_ID> Discord mention syntax with @DisplayName for all
non-bot users in incoming messages, so the LLM sees real names instead
of numeric IDs and responds using names naturally.

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-18 19:34:17 -07:00
Suppai_NekoandDadBot 2001c25bb6 Merge dolphin-mistral: background model split, logging, semaphore, cooldowns, prompt updates
- Structured logging with timestamps and per-task prefixes ([agent], [dossier], etc.)
- Background LLM semaphore to prevent concurrent background calls
- 120s cooldown after background task failures
- 90s timeout on background LLM calls to prevent deadlocks
- BACKGROUND_MODEL env var to use a separate model for dossier/compaction tasks
- Strip <think> tags from model responses (Qwen compat)
- Prompt: read the room for dynamic mood adaptation
- Prompt: blunt one-line self-correction, no apologies
- Prompt: more aggressive stance, never fold under pressure
- Updated personality.txt: less people-pleasing, more authentic

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-18 15:01:30 -07:00
Suppai_NekoandDadBot 82b9bbde73 Add BACKGROUND_MODEL to split chat and background LLM calls
Dossier extraction and compaction now use a separate BACKGROUND_MODEL
(dolphin-mistral) to avoid Qwen3.5 timeout issues on background tasks.

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-18 12:39:35 -07:00
Suppai_NekoandDadBot f283fa5360 Add Qwen3.5 support: logging, semaphore, cooldown, background timeouts
- Switch model to qwen3.5-35b-a3b
- Add structured logging with timestamps and per-task prefixes
- Add background LLM semaphore to prevent concurrent background calls
- Add 120s cooldown after background task failures
- Add 90s timeout on background LLM calls to prevent semaphore deadlock
- Strip <think> tags from Qwen model responses
- Tune prompt: more aggressive stance, no folding under pressure

Co-Authored-By: DadBot <dadbot@localhost>
2026-03-18 12:28:49 -07:00
Suppai_Neko ca825feb95 Add .gitignore to exclude .env and runtime data files 2026-03-18 11:48:54 -07:00
Suppai_Neko b907708efe Initial commit: DadBot Discord bot with MCP search, dossiers, and self-modifying personality 2026-03-18 11:48:42 -07:00