diff --git a/lollms/personality.py b/lollms/personality.py index dbca1a4..86ab224 100644 --- a/lollms/personality.py +++ b/lollms/personality.py @@ -1052,6 +1052,7 @@ class APScript(StateMachine): else: ASCIIColors.error("Pytorch installed successfully!!") + def add_file(self, path, callback=None): if callback is not None: callback("File added successfully",MSG_TYPE.MSG_TYPE_INFO) diff --git a/lollms/utilities.py b/lollms/utilities.py index 38404d3..5494c1f 100644 --- a/lollms/utilities.py +++ b/lollms/utilities.py @@ -7,6 +7,17 @@ import re import subprocess import gc +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 AdvancedGarbageCollector: @staticmethod def hardCollect(obj): diff --git a/setup.py b/setup.py index 4ab8a10..24d5b0b 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def get_all_files(path): setuptools.setup( name="lollms", - version="4.5.1", + version="4.5.3", author="Saifeddine ALOUI", author_email="aloui.saifeddine@gmail.com", description="A python library for AI personality definition",