Skip to content

Commit

Permalink
Support format strings in prompt_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ViStefan committed Sep 13, 2024
1 parent d022827 commit 7196171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion motleycrew/agents/parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def compose_prompt(
prompt_messages += self.prompt_prefix.invoke(input_dict).to_messages()

elif isinstance(self.prompt_prefix, str):
prompt_messages.append(SystemMessage(content=self.prompt_prefix))
prompt_messages.append(SystemMessage(content=self.prompt_prefix.format(**input_dict)))

else:
raise ValueError("Agent description must be a string or a ChatPromptTemplate")
Expand Down

0 comments on commit 7196171

Please sign in to comment.