Skip to content

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.

Fix fstring bug.

BillSchumacher05bafb983844
diff --git a/autogpt/agent/agent_manager.py b/autogpt/agent/agent_manager.py
index 3db2fdd6a4..85b61b7181 100644
--- a/autogpt/agent/agent_manager.py
+++ b/autogpt/agent/agent_manager.py
@@ -47,7 +47,8 @@ class AgentManager(metaclass=Singleton):
for i, plugin in enumerate(self.cfg.plugins):
plugin_result = plugin.on_instruction(messages)
if plugin_result:
- plugins_reply = f"{plugins_reply}{'' if not i else '\n'}{plugin_result}"
+ sep = '' if not i else '\n'
+ plugins_reply = f"{plugins_reply}{sep}{plugin_result}"
if plugins_reply and plugins_reply != "":
messages.append({"role": "assistant", "content": plugins_reply})
@@ -96,7 +97,8 @@ class AgentManager(metaclass=Singleton):
for i, plugin in enumerate(self.cfg.plugins):
plugin_result = plugin.on_instruction(messages)
if plugin_result:
- plugins_reply = f"{plugins_reply}{'' if not i else '\n'}{plugin_result}"
+ sep = '' if not i else '\n'
+ plugins_reply = f"{plugins_reply}{sep}{plugin_result}"
# Update full message history
if plugins_reply and plugins_reply != "":
messages.append({"role": "assistant", "content": plugins_reply})