mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
fix format issues
This commit is contained in:
parent
22841804a5
commit
91a0637174
2 changed files with 9 additions and 10 deletions
|
|
@ -38,15 +38,14 @@ class Task(BaseModel):
|
|||
{available_commands}
|
||||
Special Command: Use {{"command_name": "end"}} to do nothing or indicate completion of all requirements and the end of actions.
|
||||
|
||||
|
||||
# Example
|
||||
{example}
|
||||
|
||||
|
||||
# Instruction
|
||||
{instruction}
|
||||
"""
|
||||
EXAMPLE = ""
|
||||
# Example
|
||||
|
||||
CMD_PROMPT = """
|
||||
{current_state}
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ class RoleZero(Role):
|
|||
### 2. Plan Status ###
|
||||
plan_status, current_task = self._get_plan_status()
|
||||
|
||||
plan_status_formated = self._format_plan_status(plan_status)
|
||||
formatted_plan_status = self._format_plan_status(plan_status)
|
||||
|
||||
### 3. Tool/Command Info ###
|
||||
tools = await self.tool_recommender.recommend_tools()
|
||||
|
|
@ -170,7 +170,7 @@ class RoleZero(Role):
|
|||
### Make Decision Dynamically ###
|
||||
prompt = self.cmd_prompt.format(
|
||||
current_state=self.cmd_prompt_current_state,
|
||||
plan_status=plan_status_formated,
|
||||
plan_status=formatted_plan_status,
|
||||
current_task=current_task,
|
||||
requirements_constraints=self.requirements_constraints,
|
||||
)
|
||||
|
|
@ -427,14 +427,14 @@ class RoleZero(Role):
|
|||
# [GOAL] create a 2048 game
|
||||
# [TASK_ID 1] (finished) Create a Product Requirement Document (PRD) for the 2048 game. This task depends on tasks[]. [Assign to Alice]
|
||||
# [TASK_ID 2] ( ) Design the system architecture for the 2048 game. This task depends on tasks[1]. [Assign to Bob]
|
||||
plan_status_formated = f"[GOAL] {plan_status['goal']}\n"
|
||||
formatted_plan_status = f"[GOAL] {plan_status['goal']}\n"
|
||||
if len(plan_status["tasks"]) > 0:
|
||||
plan_status_formated += "[Plan]\n"
|
||||
formatted_plan_status += "[Plan]\n"
|
||||
for task in plan_status["tasks"]:
|
||||
plan_status_formated += f"[TASK_ID {task['task_id']}] ({'finished' if task['is_finished'] else ' '}){task['instruction']} This task depends on tasks{task['dependent_task_ids']}. [Assign to {task['assignee']}]\n"
|
||||
formatted_plan_status += f"[TASK_ID {task['task_id']}] ({'finished' if task['is_finished'] else ' '}){task['instruction']} This task depends on tasks{task['dependent_task_ids']}. [Assign to {task['assignee']}]\n"
|
||||
else:
|
||||
plan_status_formated += "No Plan \n"
|
||||
return plan_status_formated
|
||||
formatted_plan_status += "No Plan \n"
|
||||
return formatted_plan_status
|
||||
|
||||
def _retrieve_experience(self) -> str:
|
||||
"""Default implementation of experience retrieval. Can be overwritten in subclasses."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue