mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 04:12:45 +02:00
change _init_code to public
This commit is contained in:
parent
27e8fdf320
commit
b214e49733
2 changed files with 5 additions and 5 deletions
|
|
@ -85,12 +85,12 @@ class ExecuteNbCode(Action):
|
|||
)
|
||||
self.reporter = NotebookReporter()
|
||||
self.set_nb_client()
|
||||
self._init_called = False
|
||||
self.init_called = False
|
||||
|
||||
async def _init_code(self):
|
||||
if not self._init_called:
|
||||
async def init_code(self):
|
||||
if not self.init_called:
|
||||
await self.run(INI_CODE)
|
||||
self._init_called = True
|
||||
self.init_called = True
|
||||
|
||||
def set_nb_client(self):
|
||||
self.nb_client = RealtimeOutputNotebookClient(
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class DataAnalyst(RoleZero):
|
|||
"""Write a code block for current task and execute it in an interactive notebook environment."""
|
||||
counter = 0
|
||||
success = False
|
||||
await self.execute_code._init_code()
|
||||
await self.execute_code.init_code()
|
||||
|
||||
# plan info
|
||||
plan_status = self.planner.get_plan_status()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue