Fix fstring bug.
parent
abb54df4d0
commit
05bafb9838
|
@ -47,7 +47,8 @@ class AgentManager(metaclass=Singleton):
|
||||||
for i, plugin in enumerate(self.cfg.plugins):
|
for i, plugin in enumerate(self.cfg.plugins):
|
||||||
plugin_result = plugin.on_instruction(messages)
|
plugin_result = plugin.on_instruction(messages)
|
||||||
if plugin_result:
|
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 != "":
|
if plugins_reply and plugins_reply != "":
|
||||||
messages.append({"role": "assistant", "content": 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):
|
for i, plugin in enumerate(self.cfg.plugins):
|
||||||
plugin_result = plugin.on_instruction(messages)
|
plugin_result = plugin.on_instruction(messages)
|
||||||
if plugin_result:
|
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
|
# Update full message history
|
||||||
if plugins_reply and plugins_reply != "":
|
if plugins_reply and plugins_reply != "":
|
||||||
messages.append({"role": "assistant", "content": plugins_reply})
|
messages.append({"role": "assistant", "content": plugins_reply})
|
||||||
|
|
Loading…
Reference in New Issue