From cb1cfaa0722c239945256ff9c3421bad7631e99a Mon Sep 17 00:00:00 2001 From: stellahsr Date: Mon, 8 Apr 2024 21:16:57 +0800 Subject: [PATCH] set nb execution path --- metagpt/actions/di/execute_nb_code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metagpt/actions/di/execute_nb_code.py b/metagpt/actions/di/execute_nb_code.py index aab204499..f9330884d 100644 --- a/metagpt/actions/di/execute_nb_code.py +++ b/metagpt/actions/di/execute_nb_code.py @@ -24,6 +24,7 @@ from rich.panel import Panel from rich.syntax import Syntax from metagpt.actions import Action +from metagpt.const import DEFAULT_WORKSPACE_ROOT from metagpt.logs import logger @@ -43,7 +44,7 @@ class ExecuteNbCode(Action): ): super().__init__( nb=nb, - nb_client=NotebookClient(nb, timeout=timeout), + nb_client=NotebookClient(nb, timeout=timeout, resources={"metadata": {"path": DEFAULT_WORKSPACE_ROOT}}), timeout=timeout, console=Console(), interaction=("ipython" if self.is_ipython() else "terminal"),