Properly save threads into redis
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s

This commit is contained in:
Nexus 2024-06-04 02:10:25 +01:00
parent 0d05d68cba
commit 0cef10b3b2
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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]]:
"""