feat: Restore local sandbox execution (#822)

This commit is contained in:
Matthew Zhou
2025-01-28 15:19:14 -10:00
committed by GitHub
parent da780793a7
commit fb691ac4b7
2 changed files with 3 additions and 2 deletions

View File

@@ -207,7 +207,7 @@ if settings.letta_pg_uri_no_default:
else:
# TODO: don't rely on config storage
engine_path = "sqlite:///" + os.path.join(config.recall_storage_path, "sqlite.db")
print("Creating sqlite engine", engine_path)
logger.info("Creating sqlite engine " + engine_path)
engine = create_engine(engine_path)

View File

@@ -225,7 +225,8 @@ class ToolExecutionSandbox:
try:
# Execute the temp file
result = runpy.run_path(temp_file_path, init_globals=env)
with self.temporary_env_vars(env):
result = runpy.run_path(temp_file_path, init_globals=env)
# Fetch the result
func_result = result.get(self.LOCAL_SANDBOX_RESULT_VAR_NAME)