Skip to content

Commit e21d465

Browse files
author
Francesco Zubani
committed
Feature request: can avoid storing interactions in episodic memory
1 parent 4c7f2d0 commit e21d465

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/cat/looking_glass/stray_cat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,10 @@ def _store_user_message_in_episodic_memory(self, user_message_text: str):
653653
doc = self.mad_hatter.execute_hook(
654654
"before_cat_stores_episodic_memory", doc, cat=self
655655
)
656+
match doc:
657+
case (None, True):
658+
log.info("Document is None; skipping storing in episodic memory.")
659+
return
656660
# store user message in episodic memory
657661
# TODO: vectorize and store also conversation chunks
658662
# (not raw dialog, but summarization)

0 commit comments

Comments
 (0)