V2.3.0 is ready

This commit is contained in:
Saifeddine ALOUI 2023-08-03 01:08:03 +02:00
parent 6b7705033d
commit 3dedbf8e1d
4 changed files with 23 additions and 4 deletions

View File

@ -1289,7 +1289,7 @@ class APScript(StateMachine):
if callback:
callback(step_text, MSG_TYPE.MSG_TYPE_STEP_PROGRESS, {'progress':progress})
def new_message(self, message_text:str, message_type:MSG_TYPE, callback: Callable[[str, int, dict], bool]=None):
def new_message(self, message_text:str, message_type:MSG_TYPE, metadata=None, callback: Callable[[str, int, dict], bool]=None):
"""This sends step rogress to front end
Args:
@ -1300,7 +1300,7 @@ class APScript(StateMachine):
callback = self.callback
if callback:
callback(message_text, MSG_TYPE.MSG_TYPE_NEW_MESSAGE, {'type':message_type})
callback(message_text, MSG_TYPE.MSG_TYPE_NEW_MESSAGE, {'type':message_type.value,'metadata':metadata})
def finished_message(self, message_text:str="", callback: Callable[[str, int, dict], bool]=None):
"""This sends step rogress to front end

View File

@ -30,6 +30,12 @@ class MSG_TYPE(Enum):
MSG_TYPE_FINISHED_MESSAGE = 17# End of current message
class SENDER_TYPES(Enum):
SENDER_TYPES_USER = 0 # Sent by user
SENDER_TYPES_AI = 1 # Sent by ai
SENDER_TYPES_SYSTEM = 2 # Sent by athe system
class GenerationPresets:
"""
Class containing various generation presets.

View File

@ -6,7 +6,7 @@ import numpy as np
from pathlib import Path
import json
import re
import subprocess
class PackageManager:
@staticmethod
def install_package(package_name):
@ -14,6 +14,19 @@ class PackageManager:
import sys
subprocess.check_call([sys.executable, "-m", "pip", "install", package_name])
class GitManager:
@staticmethod
def git_pull(folder_path):
try:
# Change the current working directory to the desired folder
subprocess.run(["git", "checkout", folder_path], check=True, cwd=folder_path)
# Run 'git pull' in the specified folder
subprocess.run(["git", "pull"], check=True, cwd=folder_path)
print("Git pull successful in", folder_path)
except subprocess.CalledProcessError as e:
print("Error occurred while executing Git pull:", e)
# Handle any specific error handling here if required
class File64BitsManager:
@staticmethod

View File

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