From 0cef10b3b2a8a472587673e4f71509dcbe6b783c Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 4 Jun 2024 02:10:25 +0100 Subject: [PATCH] Properly save threads into redis --- src/cogs/ollama.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index d282a46..81d7108 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -351,6 +351,7 @@ class ChatHistory: new = self._construct_message(role, content, images) self.log.debug("Adding message to thread %r: %r", thread, new) self._internal[thread]["messages"].append(new) + self.save_thread(thread) def get_history(self, thread: str) -> list[dict[str, str]]: """