mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-29 10:56:22 +02:00
fix bug of ExecuteNbCode._init_code was never awaited
This commit is contained in:
parent
a5b94af82f
commit
f2cf8dd74b
2 changed files with 5 additions and 2 deletions
|
|
@ -85,10 +85,12 @@ class ExecuteNbCode(Action):
|
|||
)
|
||||
self.reporter = NotebookReporter()
|
||||
self.set_nb_client()
|
||||
asyncio.run(self._init_code())
|
||||
self._init_called = False
|
||||
|
||||
async def _init_code(self):
|
||||
await self.run(INI_CODE)
|
||||
if not self._init_called:
|
||||
await self.run(INI_CODE)
|
||||
self._init_called = True
|
||||
|
||||
def set_nb_client(self):
|
||||
self.nb_client = RealtimeOutputNotebookClient(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue