AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
add post_instruction hook
BillSchumacher397627d1b9d7
diff --git a/autogpt/agent/agent_manager.py b/autogpt/agent/agent_manager.pyindex 1c811f8622..3db2fdd6a4 100644--- a/autogpt/agent/agent_manager.py+++ b/autogpt/agent/agent_manager.py@@ -58,7 +58,10 @@ class AgentManager(metaclass=Singleton):self.agents[key] = (task, messages, model)- return key, plugins_reply+ for plugin in self.cfg.plugins:+ agent_reply = plugin.post_instruction(agent_reply)++ return key, agent_replydef message_agent(self, key: Union[str, int], message: str) -> str:"""Send a message to an agent and return its response@@ -98,7 +101,10 @@ class AgentManager(metaclass=Singleton):if plugins_reply and plugins_reply != "":messages.append({"role": "assistant", "content": plugins_reply})- return plugins_reply+ for plugin in self.cfg.plugins:+ agent_reply = plugin.post_instruction(agent_reply)++ return agent_replydef list_agents(self) -> List[Tuple[Union[str, int], str]]:"""Return a list of all agents