Properly save threads into redis
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
This commit is contained in:
parent
0d05d68cba
commit
0cef10b3b2
1 changed files with 1 additions and 0 deletions
|
@ -351,6 +351,7 @@ class ChatHistory:
|
||||||
new = self._construct_message(role, content, images)
|
new = self._construct_message(role, content, images)
|
||||||
self.log.debug("Adding message to thread %r: %r", thread, new)
|
self.log.debug("Adding message to thread %r: %r", thread, new)
|
||||||
self._internal[thread]["messages"].append(new)
|
self._internal[thread]["messages"].append(new)
|
||||||
|
self.save_thread(thread)
|
||||||
|
|
||||||
def get_history(self, thread: str) -> list[dict[str, str]]:
|
def get_history(self, thread: str) -> list[dict[str, str]]:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue