Expand description
Lightweight, zero-cost conversational mood detection.
SOUL.md defines the bot’s stable personality; this adds the fluid
layer — a coarse read of the user’s current emotional state from their
latest message — so the bot can adapt tone (empathize when they’re
frustrated, be crisp when they’re in a hurry) without any extra LLM call.
Detection is deliberately conservative: it only fires on clear signals and
otherwise returns None (no injection), since a wrong mood read is worse
than none. Cues cover both English and Chinese.
Enums§
- Mood
- A coarse read of the user’s current emotional tone.
Functions§
- detect_
mood - Detect a coarse mood from the user’s latest message. Returns
Nonewhen the signal is weak or neutral. Negative states are checked first since handling them well matters most. - mood_
hint - Build the
<conversation_mood>body for the latest user message, orNone.