From 6e61ea4b1f560c3a744e90996daed5858a19c5ac Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 13 May 2024 01:24:50 +0200 Subject: [PATCH] fixed some bugs --- events/lollms_discussion_events.py | 19 ++++++++++--------- lollms_core | 2 +- lollms_webui.py | 2 +- zoos/personalities_zoo | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/events/lollms_discussion_events.py b/events/lollms_discussion_events.py index 603ec7e9..513c6f7e 100644 --- a/events/lollms_discussion_events.py +++ b/events/lollms_discussion_events.py @@ -54,15 +54,6 @@ def add_events(sio:socketio): lollmsElfServer.session.get_client(client_id).discussion = lollmsElfServer.db.load_last_discussion() if lollmsElfServer.personality.welcome_message!="": - if lollmsElfServer.personality.processor: - 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"]: @@ -100,6 +91,16 @@ def add_events(sio:socketio): else: welcome_message = lollmsElfServer.personality.welcome_message + if lollmsElfServer.personality.processor: + lollmsElfServer.ShowBlockingMessage("Building custom welcome message.\nPlease standby.") + try: + welcome_message = lollmsElfServer.personality.processor.get_welcome(welcome_message,client) + if welcome_message is None: + welcome_message = lollmsElfServer.personality.welcome_message + except Exception as ex: + trace_exception(ex) + lollmsElfServer.HideBlockingMessage() + try: nb_tokens = len(lollmsElfServer.model.tokenize(welcome_message)) except: diff --git a/lollms_core b/lollms_core index 4734597d..4155243c 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 4734597da2f75eef8963e278b3cfd4b19f20e865 +Subproject commit 4155243cbcd8e7c0280dc9fddf0a6433e24ace39 diff --git a/lollms_webui.py b/lollms_webui.py index 0f839c0a..c437b806 100644 --- a/lollms_webui.py +++ b/lollms_webui.py @@ -1274,8 +1274,8 @@ class LOLLMSWebUI(LOLLMSElfServer): self.personality.full(client.generated_text) except Exception as ex: trace_exception(ex) - self.close_message(client_id) self.update_message(client_id, "Generating ...", msg_type=MSG_TYPE.MSG_TYPE_STEP_END) + self.close_message(client_id) client.processing=False if client.schedule_for_deletion: diff --git a/zoos/personalities_zoo b/zoos/personalities_zoo index 439351e3..9cab56f8 160000 --- a/zoos/personalities_zoo +++ b/zoos/personalities_zoo @@ -1 +1 @@ -Subproject commit 439351e387414828fc5dced5cdc31ff7f0443d4b +Subproject commit 9cab56f8c7f7e08480c9f036ca552d4844a538fb