diff --git a/metagpt/actions/action_node.py b/metagpt/actions/action_node.py index 7109f287e2..786550cb1c 100644 --- a/metagpt/actions/action_node.py +++ b/metagpt/actions/action_node.py @@ -597,8 +597,9 @@ async def xml_fill(self, context: str, images: Optional[Union[str, list[str]]] = async def fill( self, *, - req, llm, + context=None, + req=None, schema="json", mode="auto", strgy="simple", @@ -609,7 +610,7 @@ async def fill( ): """Fill the node(s) with mode. - :param req: Everything we should know when filling node. + :param context: Everything we should know when filling node. :param llm: Large Language Model with pre-defined system message. :param schema: json/markdown, determine example and output format. - raw: free form text @@ -628,6 +629,10 @@ async def fill( :return: self """ self.set_llm(llm) + if not req and context: + req = context + if not context and req: + context = req self.set_context(req) if self.schema: schema = self.schema