From db3ad34db22a8aea5e9196bb627b6c6816b4fda5 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sat, 11 May 2024 23:33:26 +0200 Subject: [PATCH] enhanced --- events/lollms_discussion_events.py | 14 ++++++++++---- lollms_core | 2 +- zoos/personalities_zoo | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/events/lollms_discussion_events.py b/events/lollms_discussion_events.py index eb7e1f9c..603ec7e9 100644 --- a/events/lollms_discussion_events.py +++ b/events/lollms_discussion_events.py @@ -44,7 +44,8 @@ def add_events(sio:socketio): ASCIIColors.yellow("New descussion requested") client_id = sid title = data["title"] - lollmsElfServer.session.get_client(client_id).discussion = lollmsElfServer.db.create_discussion(title) + client = lollmsElfServer.session.get_client(client_id) + client.discussion = lollmsElfServer.db.create_discussion(title) # Get the current timestamp timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") @@ -54,9 +55,14 @@ def add_events(sio:socketio): if lollmsElfServer.personality.welcome_message!="": if lollmsElfServer.personality.processor: - welcome_message = lollmsElfServer.personality.processor.get_welcome() - if welcome_message is not None: - lollmsElfServer.personality.welcome_message = welcome_message + lollmsElfServer.ShowBlockingMessage("Building custom welcome message.\nPlease standby.") + try: + welcome_message = lollmsElfServer.personality.processor.get_welcome(client) + if welcome_message is not None: + lollmsElfServer.personality.welcome_message = welcome_message + except Exception as ex: + trace_exception(ex) + lollmsElfServer.HideBlockingMessage() if lollmsElfServer.personality.welcome_audio_path.exists(): for voice in lollmsElfServer.personality.welcome_audio_path.iterdir(): if voice.suffix.lower() in [".wav",".mp3"]: diff --git a/lollms_core b/lollms_core index c319cfe0..836df0c1 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit c319cfe00cc9bfe725bbc662ffefa92af6118521 +Subproject commit 836df0c16f69f5075d2fe6ad527542f59e081939 diff --git a/zoos/personalities_zoo b/zoos/personalities_zoo index 1eb12731..4e63e374 160000 --- a/zoos/personalities_zoo +++ b/zoos/personalities_zoo @@ -1 +1 @@ -Subproject commit 1eb12731f20e83d10099b1bb72089d6e395285fc +Subproject commit 4e63e374fa66d20f6ad9ba2c50c3ded797e32b37