mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-29 23:54:12 +00:00
fixed issues
This commit is contained in:
parent
2cfebbbdb3
commit
5486da4dfe
@ -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.
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user