diff --git a/metagpt/roles/di/data_analyst.py b/metagpt/roles/di/data_analyst.py index 2b1bb10b1..c52127527 100644 --- a/metagpt/roles/di/data_analyst.py +++ b/metagpt/roles/di/data_analyst.py @@ -105,5 +105,7 @@ class DataAnalyst(RoleZero): status = 'Success' if success else 'Failed' output = CODE_STATUS.format(code=code, status=status, result=result) + if success: + output += 'The code written has been executed successfully.' self.rc.working_memory.clear() return output diff --git a/metagpt/strategy/experience_retriever.py b/metagpt/strategy/experience_retriever.py index 5f1c443c9..f667f03a5 100644 --- a/metagpt/strategy/experience_retriever.py +++ b/metagpt/strategy/experience_retriever.py @@ -1035,7 +1035,7 @@ Explanation: The requirement is to scrape data from a website and extract inform "command_name": "Plan.append_task", "args": { "task_id": "2", - "dependent_task_ids": ["3"], + "dependent_task_ids": ["1"], "instruction": "Parse the html content to scrape the restaurant names and print it.", "assignee": "David" } diff --git a/metagpt/strategy/planner.py b/metagpt/strategy/planner.py index 95ad1f5cc..d195cc03b 100644 --- a/metagpt/strategy/planner.py +++ b/metagpt/strategy/planner.py @@ -47,7 +47,7 @@ PLAN_STATUS = """ {current_task_result} ## Task Guidance -Write code for the incomplete sections of 'Current Task'. And avoid duplicating code from 'Finished Tasks', such as repeated import of packages, reading data, etc. +Write code for the incomplete sections of 'Current Task'. And avoid duplicating code from 'Finished Tasks' and 'Finished Section of Current Task', such as repeated import of packages, reading data, etc. Specifically, {guidance} """