mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-21 06:04:23 +01:00
Fix fstring bug.
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user