From 83633c1559ba8418185c9698bd3c47637588febf Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 29 Nov 2023 18:34:40 +0100 Subject: [PATCH] Update personality.py --- lollms/personality.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lollms/personality.py b/lollms/personality.py index 3331e02..1e71ad6 100644 --- a/lollms/personality.py +++ b/lollms/personality.py @@ -534,10 +534,10 @@ Date: {{date}} try: self.vectorizer.remove_document(path) if callback is not None: - callback("File added successfully",MSG_TYPE.MSG_TYPE_INFO) + callback("File removed successfully",MSG_TYPE.MSG_TYPE_INFO) return True except ValueError as ve: - ASCIIColors.error(f"Unsupported file format. Supported formats are {GenericDataLoader.get_supported_file_types()}") + ASCIIColors.error(f"Couldn't remove the file") return False else: self.vectorizer = None @@ -548,10 +548,10 @@ Date: {{date}} try: self.vectorizer.remove_document(path) if callback is not None: - callback("File added successfully",MSG_TYPE.MSG_TYPE_INFO) + callback("File removed successfully",MSG_TYPE.MSG_TYPE_INFO) return True except ValueError as ve: - ASCIIColors.error(f"Unsupported file format. Supported formats are {GenericDataLoader.get_supported_file_types()}") + ASCIIColors.error(f"Couldn't remove file") return False else: self.vectorizer = None @@ -637,7 +637,7 @@ Date: {{date}} callback("File added successfully",MSG_TYPE.MSG_TYPE_INFO) return True except ValueError as ve: - ASCIIColors.error(f"Unsupported file format. Supported formats are {GenericDataLoader.get_supported_file_types()}") + ASCIIColors.error(f"Unsupported file format or empty file.\nSupported formats are {GenericDataLoader.get_supported_file_types()}") return False def save_personality(self, package_path=None): """