This commit is contained in:
Saifeddine ALOUI 2024-11-20 00:37:38 +01:00
parent adf292355d
commit 4df0a41564

View File

@ -703,9 +703,13 @@ class LollmsApplication(LoLLMsCom):
try: try:
personality = PersonalityBuilder(self.lollms_paths, self.config, self.model, self, callback=callback).build_personality(id) personality = PersonalityBuilder(self.lollms_paths, self.config, self.model, self, callback=callback).build_personality(id)
if personality.model is not None: if personality.model is not None:
self.cond_tk = personality.model.tokenize(personality.personality_conditioning) try:
self.n_cond_tk = len(self.cond_tk) self.cond_tk = personality.model.tokenize(personality.personality_conditioning)
ASCIIColors.success(f"Personality {personality.name} mounted successfully") self.n_cond_tk = len(self.cond_tk)
ASCIIColors.success(f"Personality {personality.name} mounted successfully")
except:
self.cond_tk = []
self.n_cond_tk = 0
else: else:
ASCIIColors.success(f"Personality {personality.name} mounted successfully but no model is selected") ASCIIColors.success(f"Personality {personality.name} mounted successfully but no model is selected")
except Exception as ex: except Exception as ex: