mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-24 06:46:40 +00:00
V2.3.0 is ready
This commit is contained in:
parent
6b7705033d
commit
3dedbf8e1d
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user