🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix conflict
seehi24e03d97ac7f
diff --cc metagpt/roles/di/role_zero.pyindex 6802fdb00,98f6be62d..8d46b9c02--- a/metagpt/roles/di/role_zero.py+++ b/metagpt/roles/di/role_zero.py@@@ -46,11 -47,12 +47,13 @@@ class RoleZero(Role)name: str = "Zero"profile: str = "RoleZero"goal: str = ""+ system_msg: Optional[list[str]] = None # Use None to conform to the default value at llm.aask+ system_prompt: str = SYSTEM_PROMPT # Use None to conform to the default value at llm.aaskcmd_prompt: str = CMD_PROMPT+ cmd_prompt_current_state: str = ""thought_guidance: str = THOUGHT_GUIDANCEinstruction: str = ROLE_INSTRUCTION- task_type_desc: str = None+ task_type_desc: Optional[str] = None# React Modereact_mode: Literal["react"] = "react"@@@ -189,9 -194,8 +195,8 @@@The `RoleZeroContextBuilder` attempts to add experiences to `req`.The `RoleZeroSerializer` extracts essential parts of `req` for the experience pool, trimming lengthy entries to retain only necessary parts."""-return await self.llm.aask(req, system_msgs=system_msgs)-+async def parse_browser_actions(self, memory: List[Message]) -> List[Message]:if not self.browser.is_empty_page:pattern = re.compile(r"Command Browser\.(\w+) executed")@@@ -257,8 -261,7 +262,7 @@@context = self.llm.format_msg(memory + [UserMessage(content=QUICK_THINK_PROMPT)])intent_result = await self.llm.aask(context)- if "YES" in intent_result:- # llm call with the original context- if "QUICK" in intent_result or "AMBIGUOUS " in intent_result: # llm call with the original context++ if "QUICK" in intent_result or "AMBIGUOUS " in intent_result: # llm call with the original contextasync with ThoughtReporter(enable_llm_stream=True) as reporter:await reporter.async_report({"type": "quick"})answer = await self.llm.aask(self.llm.format_msg(memory))