mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
Upgraded notification
This commit is contained in:
parent
8b7690d0d7
commit
3568ca8d5e
@ -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)
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user