module

Crig::Memory::DemotionHook

A side-channel for messages that a memory policy or adapter removes from active history during ConversationMemory#load.

Hooks should be inexpensive: they run inline on every load that produces demoted messages.

Instance methods

on_demote(conversation_id : String, messages : Array(Crig::Completion::Message)) : Nil
Source