final version

This commit is contained in:
Saifeddine ALOUI 2023-11-27 01:43:01 +01:00
parent 01b560bcf6
commit 6a4c48c724
2 changed files with 5 additions and 4 deletions

View File

@ -1588,14 +1588,15 @@ class APScript(StateMachine):
def execute_python(self, code, code_folder=None, code_file_name=None):
code_folder = Path(code_folder)
if code_folder is not None:
code_folder = Path(code_folder)
def spawn_process(code):
"""Executes Python code and returns the output as JSON."""
# Create a temporary file.
root_folder = self.personality.personality_output_folder
root_folder = code_folder if code_folder is not None else self.personality.personality_output_folder
root_folder.mkdir(parents=True,exist_ok=True)
tmp_file = root_folder/f"ai_code.py"
tmp_file = root_folder/(code_file_name if code_file_name is not None else f"ai_code.py")
with open(tmp_file,"w") as f:
f.write(code)

View File

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