diff --git a/metagpt/ext/android_assistant/actions/parse_record.py b/metagpt/ext/android_assistant/actions/parse_record.py index 304daf6556..1eec7bdc1e 100644 --- a/metagpt/ext/android_assistant/actions/parse_record.py +++ b/metagpt/ext/android_assistant/actions/parse_record.py @@ -109,7 +109,7 @@ async def run(self, task_dir: Path, docs_dir: Path): logger.info(f"Waiting for GPT-4V to generate documentation for the element {resource_id}") node = await RECORD_PARSE_NODE.fill( - context=context, llm=self.llm, images=[img_before_base64, img_after_base64] + req=context, llm=self.llm, images=[img_before_base64, img_after_base64] ) if "error" in node.content: return AndroidActionOutput(action_state=RunState.FAIL) diff --git a/metagpt/ext/android_assistant/actions/screenshot_parse.py b/metagpt/ext/android_assistant/actions/screenshot_parse.py index 4d8bb0e1eb..fd3f6a5ab7 100644 --- a/metagpt/ext/android_assistant/actions/screenshot_parse.py +++ b/metagpt/ext/android_assistant/actions/screenshot_parse.py @@ -143,7 +143,7 @@ async def run( ui_doc = self._makeup_ui_document(elem_list, docs_dir) context = parse_template.format(ui_document=ui_doc, task_description=task_desc, last_act=last_act) - node = await SCREENSHOT_PARSE_NODE.fill(context=context, llm=self.llm, images=[img_base64]) + node = await SCREENSHOT_PARSE_NODE.fill(req=context, llm=self.llm, images=[img_base64]) if "error" in node.content: return AndroidActionOutput(action_state=RunState.FAIL) diff --git a/metagpt/ext/android_assistant/actions/self_learn_and_reflect.py b/metagpt/ext/android_assistant/actions/self_learn_and_reflect.py index 5e9cfbb454..7c5cf05c80 100644 --- a/metagpt/ext/android_assistant/actions/self_learn_and_reflect.py +++ b/metagpt/ext/android_assistant/actions/self_learn_and_reflect.py @@ -101,7 +101,7 @@ async def run_self_learn( self_explore_template = screenshot_parse_self_explore_template context = self_explore_template.format(task_description=task_desc, last_act=last_act) - node = await SCREENSHOT_PARSE_NODE.fill(context=context, llm=self.llm, images=[img_base64]) + node = await SCREENSHOT_PARSE_NODE.fill(req=context, llm=self.llm, images=[img_base64]) logger.debug(f"fill result:{node}") if "error" in node.content: return AndroidActionOutput(action_state=RunState.FAIL) diff --git a/metagpt/ext/android_assistant/roles/android_assistant.py b/metagpt/ext/android_assistant/roles/android_assistant.py index 97d66d30e4..9f94b6a00e 100644 --- a/metagpt/ext/android_assistant/roles/android_assistant.py +++ b/metagpt/ext/android_assistant/roles/android_assistant.py @@ -96,7 +96,7 @@ async def _observe(self, ignore_memory=True) -> int: ignore_memory = False state_val = newest_msg.content.split(".")[-1] # RoundCount: 1, action_state: RunState.SUCCESS logger.warning(f"Latest action_state is {state_val}, will run in the remainder rounds without `react`") - return await super()._observe(ignore_memory) + return await super()._observe() async def _act(self) -> Message: logger.info(f"{self._setting}: to do {self.rc.todo}({self.rc.todo.name})")