mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 01:36:29 +02:00
Merge branch 'mgx_ops' of https://gitlab.deepwisdomai.com/pub/MetaGPT into mgx_ops
This commit is contained in:
commit
40a0346e1e
1 changed files with 5 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ from rich.syntax import Syntax
|
|||
|
||||
from metagpt.actions import Action
|
||||
from metagpt.const import DEFAULT_WORKSPACE_ROOT
|
||||
from metagpt.logs import logger
|
||||
from metagpt.logs import ToolLogItem, log_tool_output, logger
|
||||
|
||||
|
||||
class ExecuteNbCode(Action):
|
||||
|
|
@ -208,6 +208,10 @@ class ExecuteNbCode(Action):
|
|||
if "!pip" in code:
|
||||
success = False
|
||||
|
||||
file_path = DEFAULT_WORKSPACE_ROOT / "code.ipynb"
|
||||
nbformat.write(self.nb, file_path)
|
||||
log_tool_output(ToolLogItem(name="file_path", value=file_path), tool_name="ExecuteNbCode")
|
||||
|
||||
return outputs, success
|
||||
|
||||
elif language == "markdown":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue