This commit is contained in:
Saifeddine ALOUI 2025-04-09 15:55:29 +02:00
parent 2e0d83e5d3
commit 921e76ba11
2 changed files with 25 additions and 19 deletions

View File

@ -1088,7 +1088,7 @@ class LollmsApplication(LoLLMsCom):
client.discussion.current_message.nb_tokens = self.model.count_tokens(client.generated_text)
except:
client.discussion.current_message.nb_tokens = None
client.discussion.current_message.update_db()
# client.discussion.current_message.update()
await self.sio.emit(
"close_message",
{
@ -1107,7 +1107,7 @@ class LollmsApplication(LoLLMsCom):
to=client_id,
)
else:
client.discussion.current_message.update_db()
# client.discussion.current_message.update_db()
await self.sio.emit(
"close_message",
{

View File

@ -68,25 +68,31 @@ class LoLLMsCom:
print(f"ERROR: Loop not available when trying to schedule {coro}")
def InfoMessage(self, content, client_id=None, verbose:bool=None):
self.schedule_task( self.notify(
content,
notification_type=NotificationType.NOTIF_SUCCESS,
duration=0,
client_id=client_id,
display_type=NotificationDisplayType.MESSAGE_BOX,
verbose=verbose
try:
self.schedule_task( self.notify(
content,
notification_type=NotificationType.NOTIF_SUCCESS,
duration=0,
client_id=client_id,
display_type=NotificationDisplayType.MESSAGE_BOX,
verbose=verbose
)
)
)
except:
ASCIIColors.info(content)
def ShowBlockingMessage(self, content, client_id=None, verbose:bool=None):
self.schedule_task( self.notify(
content,
notification_type=NotificationType.NOTIF_SUCCESS,
duration=0,
client_id=client_id,
display_type=NotificationDisplayType.SHOW_BLOCKING_MESSAGE,
verbose=verbose
)
)
try:
self.schedule_task( self.notify(
content,
notification_type=NotificationType.NOTIF_SUCCESS,
duration=0,
client_id=client_id,
display_type=NotificationDisplayType.SHOW_BLOCKING_MESSAGE,
verbose=verbose
)
)
except:
ASCIIColors.info(content)
def HideBlockingMessage(self, client_id=None, verbose:bool=None):
self.schedule_task( self.notify(