From bbbc56123fe63b87a47e1812c708250dde285ae0 Mon Sep 17 00:00:00 2001 From: allinoneallinone00 Date: Mon, 22 Apr 2024 11:41:14 +0000 Subject: [PATCH] Fix mongodb for cohere --- utils/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/db.py b/utils/db.py index 8fc1a0d..b139cbf 100644 --- a/utils/db.py +++ b/utils/db.py @@ -71,12 +71,12 @@ class MongoDatabase(Database): self._client.close() def add_chat_history(self, message): - chat_history = db.get("core.cohere", "chat_history", default=[]) + chat_history = db.get("core.cohere", "chat_history", expected_value=[]) chat_history.append(message) db.set("core.cohere", "chat_history", chat_history) def get_chat_history(self): - return db.get("core.cohere", "chat_history", default=[]) + return db.get("core.cohere", "chat_history", expected_value=[]) class SqliteDatabase(Database):