Fix another bad implementation detail.

pull/2531/head
BillSchumacher 2023-04-15 23:54:20 -05:00
parent fc7db7d86f
commit 00225e01b3
No known key found for this signature in database
GPG Key ID: 1133789BDD03E12A
1 changed files with 4 additions and 2 deletions

View File

@ -32,7 +32,8 @@ class AgentManager(metaclass=Singleton):
for plugin in self.cfg.plugins:
plugin_messages = plugin.pre_instruction(messages)
if plugin_messages:
messages.extend(plugin_messages)
for plugin_message in plugin_messages:
messages.append({"role": "system", "content": plugin_message})
# Start GPT instance
agent_reply = create_chat_completion(
@ -77,7 +78,8 @@ class AgentManager(metaclass=Singleton):
for plugin in self.cfg.plugins:
plugin_messages = plugin.pre_instruction(messages)
if plugin_messages:
messages.extend(plugin_messages)
for plugin_message in plugin_messages:
messages.append({"role": "system", "content": plugin_message})
# Start GPT instance
agent_reply = create_chat_completion(