Add get_cache method to ChatService

This commit is contained in:
anovazzi1 2024-01-19 17:22:10 -03:00
commit 4b1d5aa2b6

View file

@ -236,6 +236,12 @@ class ChatService(Service):
logger.error(f"Error closing connection: {exc}") logger.error(f"Error closing connection: {exc}")
self.disconnect(client_id) self.disconnect(client_id)
def get_cache(self, client_id: str) -> Any:
"""
Get the cache for a client.
"""
return self.chat_cache.get(client_id)
def dict_to_markdown_table(my_dict): def dict_to_markdown_table(my_dict):
markdown_table = "| Key | Value |\n|---|---|\n" markdown_table = "| Key | Value |\n|---|---|\n"