flavor_memory
Flavor Memory — Per-channel gustatory history in Redis.
Tracks which flavors a user has referenced, how often, and when. Provides familiarity bonuses: more mentions → stronger OXT/MOR on re-encounter.
- async flavor_memory.record_flavor(redis_client, channel_id, flavor_name)[source]
Log a flavor reference for a channel.
Each entry: {“flavor”: name, “ts”: timestamp, “count”: N} Maintains a running history of the last _MAX_HISTORY unique flavors.
- async flavor_memory.get_flavor_affinity(redis_client, channel_id, flavor_name)[source]
Get familiarity bonus for a specific flavor in this channel.
Returns a multiplier: 1.0 for unknown, up to ~1.5 for very familiar. The bonus follows a log curve: rapid early gain, diminishing returns.
Used as a multiplier on OXT and MOR deltas during Phase 4 NCM computation.