🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix tests
geekan3677d44b47c5
diff --git a/metagpt/actions/talk_action.py b/metagpt/actions/talk_action.pyindex d49152f83..eab1740fc 100644--- a/metagpt/actions/talk_action.py+++ b/metagpt/actions/talk_action.py@@ -22,10 +22,11 @@ class TalkAction(Action):@propertydef agent_description(self):- return self.g_context.kwargs["agent_description"]+ return self.g_context.kwargs.agent_description+ @propertydef language(self):- return self.g_context.kwargs["language"] or config.language+ return self.g_context.kwargs.language or config.language@propertydef prompt(self):@@ -41,7 +42,7 @@ class TalkAction(Action):prompt += ("If the information is insufficient, you can search in the historical conversation or knowledge above.\n")- language = self.language()+ language = self.languageprompt += (f"Answer the following questions strictly in {language}, and the answers must follow the Markdown format.\n "f"{self.context}"@@ -55,7 +56,7 @@ class TalkAction(Action):"{role}": self.agent_description or "","{history}": self.history_summary or "","{knowledge}": self.knowledge or "",- "{language}": self.language(),+ "{language}": self.language,"{ask}": self.context,}prompt = TalkActionPrompt.FORMATION_LOOSE@@ -73,7 +74,7 @@ class TalkAction(Action):@propertydef aask_args(self):- language = self.language()+ language = self.languagesystem_msgs = [f"You are {self.agent_description}.","Your responses should align with the role-play agreement, "