mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-21 14:05:17 +02:00
add task desc to write code
This commit is contained in:
parent
0746ef882d
commit
1973af1633
1 changed files with 7 additions and 2 deletions
|
|
@ -60,14 +60,19 @@ class DataAnalyst(RoleZero):
|
|||
self.rc.working_memory.add(Message(content=browser_actions, role="user", cause_by="browser"))
|
||||
return memory
|
||||
|
||||
async def write_and_exec_code(self):
|
||||
"""Write a code block for current task and execute it in an interactive notebook environment."""
|
||||
async def write_and_exec_code(self, task_desc: str):
|
||||
"""Write a code block for current task and execute it in an interactive notebook environment.
|
||||
|
||||
Args:
|
||||
task_desc (str): The task description for which the code needs to be written.
|
||||
"""
|
||||
counter = 0
|
||||
success = False
|
||||
await self.execute_code.init_code()
|
||||
|
||||
# plan info
|
||||
plan_status = self.planner.get_plan_status()
|
||||
plan_status = plan_status + f"\nSpecific Task Description:{task_desc}"
|
||||
|
||||
# tool info
|
||||
if self.custom_tool_recommender:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue