Skip to content

Commit

Permalink
make sure human message is sent first
Browse files Browse the repository at this point in the history
  • Loading branch information
mruwnik committed Jun 5, 2024
1 parent fbad8ae commit dbdd215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/stampy_chat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class PrefixedPrompt(BaseChatPromptTemplate):
def format_messages(self, **kwargs: Any) -> List[BaseMessage]:
history = kwargs[self.messages_field]
if history and self.prompt:
return [AIMessage(content=self.prompt)] + [self.transformer(i) for i in history]
return [HumanMessage(content=self.prompt)] + [self.transformer(i) for i in history]
return []


Expand Down

0 comments on commit dbdd215

Please sign in to comment.