mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-19 04:37:54 +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):
|
def mount_personality(self, id:int, callback=None):
|
||||||
try:
|
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:
|
if personality.model is not None:
|
||||||
self.cond_tk = personality.model.tokenize(personality.personality_conditioning)
|
self.cond_tk = personality.model.tokenize(personality.personality_conditioning)
|
||||||
self.n_cond_tk = len(self.cond_tk)
|
self.n_cond_tk = len(self.cond_tk)
|
||||||
@ -194,7 +194,7 @@ class LollmsApplication:
|
|||||||
|
|
||||||
def load_personality(self, callback=None):
|
def load_personality(self, callback=None):
|
||||||
try:
|
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:
|
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"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}")
|
ASCIIColors.error(f"Binding returned this exception : {ex}")
|
||||||
|
@ -402,7 +402,8 @@ class LoLLMsServer(LollmsApplication):
|
|||||||
personality_path,
|
personality_path,
|
||||||
self.lollms_paths,
|
self.lollms_paths,
|
||||||
self.config,
|
self.config,
|
||||||
self.model
|
self.model,
|
||||||
|
self
|
||||||
)
|
)
|
||||||
self.personalities.append(personality)
|
self.personalities.append(personality)
|
||||||
self.config["personalities"].append(personality_path)
|
self.config["personalities"].append(personality_path)
|
||||||
|
@ -51,7 +51,8 @@ class AIPersonality:
|
|||||||
personality_package_path: str|Path,
|
personality_package_path: str|Path,
|
||||||
lollms_paths:LollmsPaths,
|
lollms_paths:LollmsPaths,
|
||||||
config:LOLLMSConfig,
|
config:LOLLMSConfig,
|
||||||
model:LLMBinding=None,
|
model:LLMBinding=None,
|
||||||
|
app=None,
|
||||||
run_scripts=True,
|
run_scripts=True,
|
||||||
selected_language=None,
|
selected_language=None,
|
||||||
is_relative_path=True,
|
is_relative_path=True,
|
||||||
@ -71,6 +72,7 @@ class AIPersonality:
|
|||||||
self.model = model
|
self.model = model
|
||||||
self.config = config
|
self.config = config
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
self.app = app
|
||||||
|
|
||||||
self.files = []
|
self.files = []
|
||||||
self.vectorizer = None
|
self.vectorizer = None
|
||||||
@ -1415,12 +1417,14 @@ class PersonalityBuilder:
|
|||||||
lollms_paths:LollmsPaths,
|
lollms_paths:LollmsPaths,
|
||||||
config:LOLLMSConfig,
|
config:LOLLMSConfig,
|
||||||
model:LLMBinding,
|
model:LLMBinding,
|
||||||
|
app=None,
|
||||||
installation_option:InstallOption=InstallOption.INSTALL_IF_NECESSARY,
|
installation_option:InstallOption=InstallOption.INSTALL_IF_NECESSARY,
|
||||||
callback=None
|
callback=None
|
||||||
):
|
):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.lollms_paths = lollms_paths
|
self.lollms_paths = lollms_paths
|
||||||
self.model = model
|
self.model = model
|
||||||
|
self.app = app
|
||||||
self.installation_option = installation_option
|
self.installation_option = installation_option
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
|
||||||
@ -1449,7 +1453,8 @@ class PersonalityBuilder:
|
|||||||
personality_folder,
|
personality_folder,
|
||||||
self.lollms_paths,
|
self.lollms_paths,
|
||||||
self.config,
|
self.config,
|
||||||
self.model,
|
self.model,
|
||||||
|
app=self.app,
|
||||||
selected_language=personality_language,
|
selected_language=personality_language,
|
||||||
installation_option=self.installation_option,
|
installation_option=self.installation_option,
|
||||||
callback=self.callback
|
callback=self.callback
|
||||||
@ -1460,6 +1465,7 @@ class PersonalityBuilder:
|
|||||||
self.lollms_paths,
|
self.lollms_paths,
|
||||||
self.config,
|
self.config,
|
||||||
self.model,
|
self.model,
|
||||||
|
app=self.app,
|
||||||
is_relative_path=False,
|
is_relative_path=False,
|
||||||
selected_language=personality_language,
|
selected_language=personality_language,
|
||||||
installation_option=self.installation_option,
|
installation_option=self.installation_option,
|
||||||
|
2
setup.py
2
setup.py
@ -26,7 +26,7 @@ def get_all_files(path):
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="lollms",
|
name="lollms",
|
||||||
version="4.5.3",
|
version="5.0.0",
|
||||||
author="Saifeddine ALOUI",
|
author="Saifeddine ALOUI",
|
||||||
author_email="aloui.saifeddine@gmail.com",
|
author_email="aloui.saifeddine@gmail.com",
|
||||||
description="A python library for AI personality definition",
|
description="A python library for AI personality definition",
|
||||||
|
Loading…
Reference in New Issue
Block a user