Skip to content

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

remove get_template function

geekan907cf5bebcfa
diff --git a/metagpt/actions/project_management.py b/metagpt/actions/project_management.py
index b33f3426d..e40c2034b 100644
--- a/metagpt/actions/project_management.py
+++ b/metagpt/actions/project_management.py
@@ -89,9 +89,6 @@ class WriteTasks(Action):
async def _run_new_tasks(self, context, schema=CONFIG.prompt_schema):
node = await PM_NODE.fill(context, self.llm, schema)
- # prompt_template, format_example = get_template(templates, format)
- # prompt = prompt_template.format(context=context, format_example=format_example)
- # rsp = await self._aask_v1(prompt, "task", OUTPUT_MAPPING, format=format)
return node
async def _merge(self, system_design_doc, task_doc, schema=CONFIG.prompt_schema) -> Document:
diff --git a/metagpt/utils/get_template.py b/metagpt/utils/get_template.py
deleted file mode 100644
index 7e05e5d5e..000000000
--- a/metagpt/utils/get_template.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
-@Time : 2023/9/19 20:39
-@Author : femto Zheng
-@File : get_template.py
-"""
-from metagpt.config import CONFIG
-
-
-def get_template(templates, schema=CONFIG.prompt_schema):
- selected_templates = templates.get(schema)
- if selected_templates is None:
- raise ValueError(f"Can't find {schema} in passed in templates")
-
- # Extract the selected templates
- prompt_template = selected_templates["PROMPT_TEMPLATE"]
- format_example = selected_templates["FORMAT_EXAMPLE"]
-
- return prompt_template, format_example