Skip to content

Commit

Permalink
Fix falcon chat template
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy committed Sep 22, 2023
1 parent a040cdc commit 0579cf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ def get_prompt(self) -> str:
elif self.sep_style == SeparatorStyle.FALCON_CHAT:
ret = ""
if self.system_message:
ret += "System: " + self.system_message + self.sep
ret += system_prompt + self.sep
for role, message in self.messages:
if message:
ret += role + ": " + message + self.sep
else:
ret += role + ": "
ret += role + ":"

return ret
else:
Expand Down Expand Up @@ -958,6 +958,7 @@ def get_conv_template(name: str) -> Conversation:
Conversation(
name="falcon-chat",
roles=("User", "Falcon"),
system_template="System: {system_message}",
messages=[],
sep_style=SeparatorStyle.FALCON_CHAT,
sep="\n",
Expand Down

0 comments on commit 0579cf0

Please sign in to comment.