mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-24 06:46:40 +00:00
cool
This commit is contained in:
parent
4e27e9a996
commit
72c296e533
@ -2509,7 +2509,6 @@ class APScript(StateMachine):
|
|||||||
if code_folder is not None:
|
if code_folder is not None:
|
||||||
code_folder = Path(code_folder)
|
code_folder = Path(code_folder)
|
||||||
|
|
||||||
def spawn_process(code):
|
|
||||||
"""Executes Python code and returns the output as JSON."""
|
"""Executes Python code and returns the output as JSON."""
|
||||||
# Create a temporary file.
|
# Create a temporary file.
|
||||||
root_folder = code_folder if code_folder is not None else self.personality.personality_output_folder
|
root_folder = code_folder if code_folder is not None else self.personality.personality_output_folder
|
||||||
@ -2537,7 +2536,6 @@ class APScript(StateMachine):
|
|||||||
|
|
||||||
# The child process was successful.
|
# The child process was successful.
|
||||||
return output.decode("utf8")
|
return output.decode("utf8")
|
||||||
return spawn_process(code)
|
|
||||||
|
|
||||||
def build_python_code(self, prompt, max_title_length=4096):
|
def build_python_code(self, prompt, max_title_length=4096):
|
||||||
if not PackageManager.check_package_installed("autopep8"):
|
if not PackageManager.check_package_installed("autopep8"):
|
||||||
|
Loading…
Reference in New Issue
Block a user