Upgraded notification

This commit is contained in:
Saifeddine ALOUI 2023-11-25 00:04:15 +01:00
parent 8b7690d0d7
commit 3568ca8d5e
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class LollmsApplication:
generated_text = self.personality.model.generate(full_discussion, n_predict=n_predict, callback=callback) generated_text = self.personality.model.generate(full_discussion, n_predict=n_predict, callback=callback)
return generated_text return generated_text
def notify(self, content, is_success, client_id=None): def notify(self, content, is_success=True, client_id=None):
if self.notification_callback: if self.notification_callback:
return self.notification_callback(content, is_success, client_id) return self.notification_callback(content, is_success, client_id)

View File

@ -92,7 +92,7 @@ class LLMBinding:
for models_folder in self.models_folders: for models_folder in self.models_folders:
models_folder.mkdir(parents=True, exist_ok=True) models_folder.mkdir(parents=True, exist_ok=True)
def notify(self, content:str, status:bool): def notify(self, content:str, status:bool=True):
if self.notification_callback: if self.notification_callback:
self.notification_callback(content, status) self.notification_callback(content, status)