fixed issues

This commit is contained in:
Saifeddine ALOUI 2023-08-01 00:50:31 +02:00
parent 2cfebbbdb3
commit 5486da4dfe
3 changed files with 10 additions and 8 deletions

View File

@ -155,6 +155,12 @@ Date: {{date}}
# Open and store the personality
self.load_personality(personality_package_path)
def setCallback(self, callback: Callable[[str, int, dict], bool]):
self.callback = callback
if self._processor:
self._processor.callback = callback
def __str__(self):
return f"{self.language}/{self.category}/{self.name}"
@ -947,12 +953,7 @@ class APScript(StateMachine):
self.models_folder = self.personality.lollms_paths.personal_models_path / self.personality.personality_folder_name
self.models_folder.mkdir(parents=True, exist_ok=True)
def setCallback(self, callback: Callable[[str, int, dict], bool]):
self.callback = callback
if self.process:
self.process.callback = callback
def load_personality_config(self):
"""
Load the content of local_config.yaml file.

View File

@ -58,7 +58,8 @@ class Image64BitsManager:
from PIL import Image
import io
import base64
Image.open(io.BytesIO(base64.b64decode(b64img)))
image_data = re.sub('^data:image/.+;base64,', '', b64img)
return Image.open(io.BytesIO(base64.b64decode(image_data)))
class TFIDFLoader:

View File

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