mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
Huge jump
This commit is contained in:
parent
fe893305c7
commit
b8071cb745
@ -124,7 +124,7 @@ class LollmsApplication:
|
||||
|
||||
def mount_personality(self, id:int, callback=None):
|
||||
try:
|
||||
personality = PersonalityBuilder(self.lollms_paths, self.config, self.model, 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:
|
||||
self.cond_tk = personality.model.tokenize(personality.personality_conditioning)
|
||||
self.n_cond_tk = len(self.cond_tk)
|
||||
@ -194,7 +194,7 @@ class LollmsApplication:
|
||||
|
||||
def load_personality(self, callback=None):
|
||||
try:
|
||||
personality = PersonalityBuilder(self.lollms_paths, self.config, self.model, callback=callback).build_personality()
|
||||
personality = PersonalityBuilder(self.lollms_paths, self.config, self.model, self, callback=callback).build_personality()
|
||||
except Exception as ex:
|
||||
ASCIIColors.error(f"Couldn't load personality. Please verify your configuration file at {self.configuration_path} or use the next menu to select a valid personality")
|
||||
ASCIIColors.error(f"Binding returned this exception : {ex}")
|
||||
|
@ -402,7 +402,8 @@ class LoLLMsServer(LollmsApplication):
|
||||
personality_path,
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
self.model
|
||||
self.model,
|
||||
self
|
||||
)
|
||||
self.personalities.append(personality)
|
||||
self.config["personalities"].append(personality_path)
|
||||
|
@ -51,7 +51,8 @@ class AIPersonality:
|
||||
personality_package_path: str|Path,
|
||||
lollms_paths:LollmsPaths,
|
||||
config:LOLLMSConfig,
|
||||
model:LLMBinding=None,
|
||||
model:LLMBinding=None,
|
||||
app=None,
|
||||
run_scripts=True,
|
||||
selected_language=None,
|
||||
is_relative_path=True,
|
||||
@ -71,6 +72,7 @@ class AIPersonality:
|
||||
self.model = model
|
||||
self.config = config
|
||||
self.callback = callback
|
||||
self.app = app
|
||||
|
||||
self.files = []
|
||||
self.vectorizer = None
|
||||
@ -1415,12 +1417,14 @@ class PersonalityBuilder:
|
||||
lollms_paths:LollmsPaths,
|
||||
config:LOLLMSConfig,
|
||||
model:LLMBinding,
|
||||
app=None,
|
||||
installation_option:InstallOption=InstallOption.INSTALL_IF_NECESSARY,
|
||||
callback=None
|
||||
):
|
||||
self.config = config
|
||||
self.lollms_paths = lollms_paths
|
||||
self.model = model
|
||||
self.app = app
|
||||
self.installation_option = installation_option
|
||||
self.callback = callback
|
||||
|
||||
@ -1449,7 +1453,8 @@ class PersonalityBuilder:
|
||||
personality_folder,
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
self.model,
|
||||
self.model,
|
||||
app=self.app,
|
||||
selected_language=personality_language,
|
||||
installation_option=self.installation_option,
|
||||
callback=self.callback
|
||||
@ -1460,6 +1465,7 @@ class PersonalityBuilder:
|
||||
self.lollms_paths,
|
||||
self.config,
|
||||
self.model,
|
||||
app=self.app,
|
||||
is_relative_path=False,
|
||||
selected_language=personality_language,
|
||||
installation_option=self.installation_option,
|
||||
|
Loading…
Reference in New Issue
Block a user