Skip to content

Commit

Permalink
no need for else condition
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Mar 18, 2024
1 parent 0c7ac28 commit 34da274
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/axolotl/prompt_strategies/orpo/chat_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ def get_chosen_conversation_thread(self, prompt) -> MessageList:
messages: List[Message] = []
if system := prompt.get("system", None):
messages.append(Message(role="system", content=system, label=False))
else:
messages.append(Message(role="system", content="", label=False))
messages.append(Message(role="user", content=prompt["prompt"], label=False))
messages.append(
Message(
Expand All @@ -84,9 +82,6 @@ def get_rejected_conversation_thread(self, prompt) -> MessageList:
messages: List[Message] = []
if system := prompt.get("system", None):
messages.append(Message(role="system", content=system, label=False))
else:
messages.append(Message(role="system", content="", label=False))

messages.append(Message(role="user", content=prompt["prompt"], label=False))
messages.append(
Message(
Expand Down

0 comments on commit 34da274

Please sign in to comment.