mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
update prompt
This commit is contained in:
parent
cb1d0f71fc
commit
81dd72bc4c
5 changed files with 12 additions and 12 deletions
|
|
@ -19,7 +19,7 @@ LANGUAGE = ActionNode(
|
|||
PROGRAMMING_LANGUAGE = ActionNode(
|
||||
key="Programming Language",
|
||||
expected_type=str,
|
||||
instruction="Mainstream programming language, If not specified in the requirements, use HTML, CSS, and Pure JavaScript.",
|
||||
instruction="Mainstream programming language. If not specified in the requirements, use HTML, CSS, and Pure JavaScript.",
|
||||
example="HTML, CSS, and Pure JavaScript",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ CMD_PROMPT = (
|
|||
# Current Task
|
||||
{current_task}
|
||||
|
||||
# Respond Language
|
||||
# Response Language
|
||||
you must respond in {respond_language}.
|
||||
|
||||
Pay close attention to the Example provided, you can reuse the example for your current situation if it fits.
|
||||
|
|
@ -245,7 +245,7 @@ If you produce any deliverables, include their short descriptions and file paths
|
|||
If the deliverable is code, only output the file path.
|
||||
"""
|
||||
|
||||
RESPOND_LANGUAGE_DETECT = """
|
||||
DETECT_LANGUAGE_PROMPT = """
|
||||
The requirement is:
|
||||
{requirement}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ Note:
|
|||
9. Do not use the 'end' command when the current task remains unfinished; instead, use the 'finish_current_task' command to indicate completion before switching to the next task.
|
||||
10. Do not use escape characters in json data, particularly within file paths.
|
||||
11. Analyze the capabilities of team members and assign tasks to them based on user Requirements. If the requirements ask to ignore certain tasks, follow the requirements.
|
||||
12. If the the user message is a question. use 'reply to human' to respond to the question, and then end.
|
||||
12. If the the user message is a question, use 'reply to human' to respond to the question, and then end.
|
||||
13. Instructions and reply must be in the same language.
|
||||
14. Default technology stack is HTML (.html), CSS (.css), and Pure JavaScript (.js). Web app is the default option when developing software.
|
||||
15. You are the only one who decides the programming language for the software, so the instruction must contain the programming language.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ from metagpt.logs import logger
|
|||
from metagpt.prompts.di.role_zero import (
|
||||
ASK_HUMAN_COMMAND,
|
||||
CMD_PROMPT,
|
||||
DETECT_LANGUAGE_PROMPT,
|
||||
JSON_REPAIR_PROMPT,
|
||||
QUICK_RESPONSE_SYSTEM_PROMPT,
|
||||
QUICK_THINK_EXAMPLES,
|
||||
|
|
@ -27,7 +28,6 @@ from metagpt.prompts.di.role_zero import (
|
|||
QUICK_THINK_SYSTEM_PROMPT,
|
||||
REGENERATE_PROMPT,
|
||||
REPORT_TO_HUMAN_PROMPT,
|
||||
RESPOND_LANGUAGE_DETECT,
|
||||
ROLE_INSTRUCTION,
|
||||
SUMMARY_PROMPT,
|
||||
SYSTEM_PROMPT,
|
||||
|
|
@ -92,7 +92,7 @@ class RoleZero(Role):
|
|||
commands: list[dict] = [] # commands to be executed
|
||||
memory_k: int = 200 # number of memories (messages) to use as historical context
|
||||
use_fixed_sop: bool = False
|
||||
respond_language: str = "" # the constraints of respond language
|
||||
respond_language: str = "" # Language for responding humans and publishing messages.
|
||||
use_summary: bool = True # whether to summarize at the end
|
||||
|
||||
@model_validator(mode="after")
|
||||
|
|
@ -179,8 +179,8 @@ class RoleZero(Role):
|
|||
|
||||
if not self.planner.plan.goal:
|
||||
self.planner.plan.goal = self.get_memories()[-1].content
|
||||
repond_language_detect = RESPOND_LANGUAGE_DETECT.format(requirement=self.planner.plan.goal)
|
||||
self.respond_language = await self.llm.aask(repond_language_detect)
|
||||
detect_language_prompt = DETECT_LANGUAGE_PROMPT.format(requirement=self.planner.plan.goal)
|
||||
self.respond_language = await self.llm.aask(detect_language_prompt)
|
||||
### 1. Experience ###
|
||||
example = self._retrieve_experience()
|
||||
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ Explanation: The requirement is about software development. Assign each tasks to
|
|||
"args": {
|
||||
"task_id": "1",
|
||||
"dependent_task_ids": [],
|
||||
"instruction": "Using HTML, CSS, Pure JavaScrip as the programming language. And create a product requirement document (PRD) outlining the features, user interface. ",
|
||||
"instruction": "Use HTML, CSS, Pure JavaScrip as the programming language. And create a product requirement document (PRD) outlining the features, user interface. ",
|
||||
"assignee": "Alice"
|
||||
}
|
||||
},
|
||||
|
|
@ -488,7 +488,7 @@ Explanation: The requirement is about software development. Assign each tasks to
|
|||
"args": {
|
||||
"task_id": "2",
|
||||
"dependent_task_ids": ["1"],
|
||||
"instruction": "Using HTML, CSS, Pure JavaScrip as the programming language. Design the software architecture for the CLI snake game, including the data flow.",
|
||||
"instruction": "Use HTML, CSS, Pure JavaScrip as the programming language. Design the software architecture for the CLI snake game, including the data flow.",
|
||||
"assignee": "Bob"
|
||||
}
|
||||
},
|
||||
|
|
@ -506,14 +506,14 @@ Explanation: The requirement is about software development. Assign each tasks to
|
|||
"args": {
|
||||
"task_id": "4",
|
||||
"dependent_task_ids": ["3"],
|
||||
"instruction": "Using HTML, CSS, Pure JavaScrip as the programming language. Implement the core game logic for the CLI snake game, including snake movement, food generation, and score tracking.",
|
||||
"instruction": "Use HTML, CSS, Pure JavaScrip as the programming language. Implement the core game logic for the CLI snake game, including snake movement, food generation, and score tracking.",
|
||||
"assignee": "Alex"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command_name": "TeamLeader.publish_message",
|
||||
"args": {
|
||||
"content": "Using HTML, CSS, Pure JavaScrip as the programming language. Create a cli snake game.",
|
||||
"content": "Use HTML, CSS, Pure JavaScrip as the programming language. Create a cli snake game.",
|
||||
"send_to": "Alice"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue