Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

update failed examples

张建生c64dee43e95e
diff --git a/examples/mgx/__init__.py b/examples/mgx/__init__.py
deleted file mode 100644
index f12b94354..000000000
--- a/examples/mgx/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# -*- coding: utf-8 -*-
-# @Author : stellahong ([email protected])
-# @Desc :
diff --git a/examples/mgx/run_mgx.py b/examples/mgx/run_mgx.py
deleted file mode 100644
index 86aa67ad7..000000000
--- a/examples/mgx/run_mgx.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# @Author : stellahong ([email protected])
-# @Desc :
-import asyncio
-
-from metagpt.roles.di.mgx import MGX
-
-requirement = (
- # "design a game using Gym (an open source Python library), including a graphical interface and interactive gameplay"
- # "帮我把pip的源设置成:https://pypi.tuna.tsinghua.edu.cn/simple"
- # "This is a website url does not require login: https://demosc.chinaz.net/Files/DownLoad//moban/202404/moban7767 please write a similar web page,developed in vue language, The package.json dependency must be generated"
- "I would like to imitate the website available at https://demosc.chinaz.net/Files/DownLoad//moban/202404/moban7767. Could you please browse through it?"
- # "Create a 2048 Game"
-)
-
-
-async def main(requirement: str = ""):
- mgx = MGX(use_intent=True, tools=["<all>"])
- await mgx.run(requirement)
-
-
-if __name__ == "__main__":
- asyncio.run(main(requirement))
diff --git a/metagpt/actions/di/write_plan.py b/metagpt/actions/di/write_plan.py
index efea9f526..cf2e51712 100644
--- a/metagpt/actions/di/write_plan.py
+++ b/metagpt/actions/di/write_plan.py
@@ -65,10 +65,14 @@ def update_plan_from_rsp(rsp: str, current_plan: Plan):
# handle a single task
if current_plan.has_task_id(tasks[0].task_id):
# replace an existing task
- current_plan.replace_task(tasks[0])
+ current_plan.replace_task(
+ tasks[0].task_id, tasks[0].dependent_task_ids, tasks[0].instruction, tasks[0].assignee
+ )
else:
# append one task
- current_plan.append_task(tasks[0])
+ current_plan.append_task(
+ tasks[0].task_id, tasks[0].dependent_task_ids, tasks[0].instruction, tasks[0].assignee
+ )
else:
# add tasks in general