mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-13 22:02:56 +00:00
fix
This commit is contained in:
parent
2e0d83e5d3
commit
921e76ba11
@ -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",
|
||||
{
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user