From bd2e7f60661a0cb100d9dc4c9f8f511c56721e62 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI <aloui.seifeddine@gmail.com> Date: Sun, 23 Mar 2025 19:13:32 +0100 Subject: [PATCH] done --- lollms/personality.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lollms/personality.py b/lollms/personality.py index 00ead79..5c11f77 100644 --- a/lollms/personality.py +++ b/lollms/personality.py @@ -353,6 +353,18 @@ class AIPersonality: if callback: callback(full_text, MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_SET_CONTENT) + def add_chunk_to_message_content(self, full_text:str, callback: Callable[[str | list | None, MSG_OPERATION_TYPE, str, Any | None], bool]=None): + """This sends full text to front end + + Args: + step_text (dict): The step text + callback (callable, optional): A callable with this signature (str, MSG_TYPE) to send the text to. Defaults to None. + """ + if not callback and self.callback: + callback = self.callback + + if callback: + callback(full_text, MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_ADD_CHUNK) def set_message_html(self, ui_text:str, callback: Callable[[str | list | None, MSG_OPERATION_TYPE, str, Any | None], bool]=None, client_id= None): """This sends ui text to front end