Skip to content

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

changed tasks to task

mannaandpoem431e53617e0d
diff --git a/metagpt/actions/project_management.py b/metagpt/actions/project_management.py
index d417bf538..67a614d6f 100644
--- a/metagpt/actions/project_management.py
+++ b/metagpt/actions/project_management.py
@@ -22,7 +22,7 @@ from metagpt.schema import Document, Documents
NEW_REQ_TEMPLATE = """
### Legacy Content
-{old_tasks}
+{old_task}
### New Requirements
{context}
@@ -77,7 +77,7 @@ class WriteTasks(Action):
return node
async def _merge(self, system_design_doc, task_doc) -> Document:
- context = NEW_REQ_TEMPLATE.format(context=system_design_doc.content, old_tasks=task_doc.content)
+ context = NEW_REQ_TEMPLATE.format(context=system_design_doc.content, old_task=task_doc.content)
node = await REFINED_PM_NODE.fill(context, self.llm, schema=self.prompt_schema)
task_doc.content = node.instruct_content.model_dump_json()
return task_doc
diff --git a/metagpt/actions/summarize_code.py b/metagpt/actions/summarize_code.py
index 0f6e0e69d..d21b62f83 100644
--- a/metagpt/actions/summarize_code.py
+++ b/metagpt/actions/summarize_code.py
@@ -110,7 +110,7 @@ class SummarizeCode(Action):
format_example = FORMAT_EXAMPLE
prompt = PROMPT_TEMPLATE.format(
system_design=design_doc.content,
- tasks=task_doc.content,
+ task=task_doc.content,
code_blocks="\n".join(code_blocks),
format_example=format_example,
)
diff --git a/metagpt/actions/write_code_review.py b/metagpt/actions/write_code_review.py
index b8c350f11..da636eb36 100644
--- a/metagpt/actions/write_code_review.py
+++ b/metagpt/actions/write_code_review.py
@@ -153,7 +153,7 @@ class WriteCodeReview(Action):
context = "\n".join(
[
"## System Design\n" + str(self.i_context.design_doc) + "\n",
- "## Tasks\n" + task_content + "\n",
+ "## Task\n" + task_content + "\n",
"## Code Files\n" + code_context + "\n",
]
)
@@ -165,7 +165,7 @@ class WriteCodeReview(Action):
"## User New Requirements\n" + str(requirement_doc) + "\n",
"## Code Plan And Change\n" + str(code_plan_and_change_doc) + "\n",
"## System Design\n" + str(self.i_context.design_doc) + "\n",
- "## Tasks\n" + task_content + "\n",
+ "## Task\n" + task_content + "\n",
"## Code Files\n" + code_context + "\n",
]
)
diff --git a/tests/metagpt/actions/test_write_code_plan_and_change_an.py b/tests/metagpt/actions/test_write_code_plan_and_change_an.py
index 383e791b8..741773e2b 100644
--- a/tests/metagpt/actions/test_write_code_plan_and_change_an.py
+++ b/tests/metagpt/actions/test_write_code_plan_and_change_an.py
@@ -60,7 +60,7 @@ async def test_refine_code(mocker):
user_requirement=NEW_REQUIREMENT_SAMPLE,
code_plan_and_change=CODE_PLAN_AND_CHANGE_SAMPLE,
design=DESIGN_SAMPLE,
- tasks=TASKS_SAMPLE,
+ task=TASKS_SAMPLE,
code=REFINED_CODE_INPUT_SAMPLE,
logs="",
feedback="",