Add get_cache method to ChatService
This commit is contained in:
parent
fd64dc9f2a
commit
4b1d5aa2b6
1 changed files with 7 additions and 1 deletions
|
|
@ -235,6 +235,12 @@ class ChatService(Service):
|
|||
except Exception as exc:
|
||||
logger.error(f"Error closing connection: {exc}")
|
||||
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):
|
||||
|
|
@ -257,4 +263,4 @@ def list_of_dicts_to_markdown_table(dict_list):
|
|||
row = [str(row_dict.get(header, "")) for header in headers]
|
||||
markdown_table += "| " + " | ".join(row) + " |\n"
|
||||
|
||||
return markdown_table
|
||||
return markdown_table
|
||||
Loading…
Add table
Add a link
Reference in a new issue