From 1ec7a9d9697879dc7555e3e05a5fd7800ca908fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Tue, 30 Apr 2024 14:32:45 +0800 Subject: [PATCH] feat: + comments --- metagpt/schema.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/metagpt/schema.py b/metagpt/schema.py index 847147c30..9fa295211 100644 --- a/metagpt/schema.py +++ b/metagpt/schema.py @@ -322,6 +322,19 @@ class Message(BaseModel): return None async def parse_resources(self, llm: "BaseLLM", key_descriptions: Dict[str, str] = None) -> Dict: + """ + `parse_resources` corresponds to the in-context adaptation capability of the input of the atomic action, + which will be migrated to the context builder later. + + Args: + llm (BaseLLM): The instance of the BaseLLM class. + key_descriptions (Dict[str, str], optional): A dictionary containing descriptions for each key, + if provided. Defaults to None. + + Returns: + Dict: A dictionary containing parsed resources. + + """ if not self.content: return {} content = f"## Original Requirement\n```text\n{self.content}\n```\n"