feat: Restore local sandbox execution (#822)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user