diff --git a/core/cat/looking_glass/stray_cat.py b/core/cat/looking_glass/stray_cat.py index b71093fd9..cc68f7109 100644 --- a/core/cat/looking_glass/stray_cat.py +++ b/core/cat/looking_glass/stray_cat.py @@ -653,6 +653,10 @@ def _store_user_message_in_episodic_memory(self, user_message_text: str): doc = self.mad_hatter.execute_hook( "before_cat_stores_episodic_memory", doc, cat=self ) + match doc: + case (None, True): + log.info("Document is None; skipping storing in episodic memory.") + return # store user message in episodic memory # TODO: vectorize and store also conversation chunks # (not raw dialog, but summarization)