[Bug fix] Fix typos, static methods and other sanity improvements in the package (#1129)

This commit is contained in:
Sandra Serrano
2024-01-08 19:47:46 +01:00
committed by GitHub
parent 62c0c52e31
commit 2496ed133e
41 changed files with 133 additions and 103 deletions

View File

@@ -113,10 +113,12 @@ class ChatHistory:
count = self.cursor.fetchone()[0]
return count
def _serialize_json(self, metadata: Dict[str, Any]):
@staticmethod
def _serialize_json(metadata: Dict[str, Any]):
return json.dumps(metadata)
def _deserialize_json(self, metadata: str):
@staticmethod
def _deserialize_json(metadata: str):
return json.loads(metadata)
def close_connection(self):