From 2b2d5bcaa2d9323055af94531108ab3d7a031e61 Mon Sep 17 00:00:00 2001 From: Zhichao Date: Tue, 1 Oct 2024 22:35:08 +0800 Subject: [PATCH] revert workspace change --- vision_agent/utils/execute.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vision_agent/utils/execute.py b/vision_agent/utils/execute.py index 86536a47..1907d106 100644 --- a/vision_agent/utils/execute.py +++ b/vision_agent/utils/execute.py @@ -464,7 +464,9 @@ def __init__( _LOGGER.info( f"E2BCodeInterpreter (sandbox id: {self.interpreter.sandbox_id}) initialized:\n{sys_versions}" ) - self.remote_path = Path(remote_path if remote_path is not None else WORKSPACE) + self.remote_path = Path( + remote_path if remote_path is not None else "/home/user" + ) def close(self, *args: Any, **kwargs: Any) -> None: try: @@ -713,7 +715,7 @@ def _get_e2b_env() -> Union[Dict[str, str], None]: openai_api_key = os.getenv("OPENAI_API_KEY", "") anthropic_api_key = os.getenv("ANTHROPIC_API_KEY", "") if openai_api_key or anthropic_api_key: - envs = {} + envs = {"WORKSPACE": os.getenv("WORKSPACE", "/home/user")} if openai_api_key: envs["OPENAI_API_KEY"] = openai_api_key if anthropic_api_key: