updated personalities

This commit is contained in:
Saifeddine ALOUI 2023-06-18 22:06:28 +02:00
parent 5bbac786cf
commit 72db7d8104
6 changed files with 13 additions and 4 deletions

View File

@ -79,6 +79,9 @@ class PersonalityBuilder:
def build_personality(self, force_reinstall=False):
if self.config["active_personality_id"]>=len(self.config["personalities"]):
ASCIIColors.warning("Personality ID was out of range. Resetting to 0.")
self.config["active_personality_id"]=0
if len(self.config["personalities"][self.config["active_personality_id"]].split("/"))==3:
self.personality = AIPersonality(self.lollms_paths, self.lollms_paths.personalities_zoo_path / self.config["personalities"][self.config["active_personality_id"]], self.model, force_reinstall= force_reinstall)
else:

@ -1 +1 @@
Subproject commit b8c304b6336d80221ad9ccd9336130ff374601c0
Subproject commit 443582f8bcba4d409cef4c80546fa5ece56e7ef9

View File

@ -320,6 +320,12 @@ class LoLLMsServer:
txt = self.current_model.detokenize(prompt)
emit("detokenized", {"text":txt})
@self.socketio.on('cancel_generation')
def cancel_generation(data):
client_id = request.sid
self.clients[client_id]["requested_stop"]=False
@self.socketio.on('generate_text')
def handle_generate_text(data):
if not self.is_ready:
@ -516,6 +522,8 @@ class LoLLMsServer:
personality = AIPersonality(self.lollms_paths, self.config.lollms_paths.personalities_zoo_path/p, self.current_model)
self.personalities.append(personality)
if self.config.active_personality_id>len(self.personalities):
self.config.active_personality_id = 0
self.active_personality = self.personalities[self.config.active_personality_id]
self.menu.show_logo()

View File

@ -65,8 +65,6 @@ class Settings:
if show_logo:
self.menu.show_logo()
if show_commands_list:
self.menu.show_commands_list()
if show_personality_infos:
try:

View File

@ -26,7 +26,7 @@ def get_all_files(path):
setuptools.setup(
name="lollms",
version="1.2.0",
version="1.2.2",
author="Saifeddine ALOUI",
author_email="aloui.saifeddine@gmail.com",
description="A python library for AI personality definition",