Skip to content

Commit

Permalink
phi test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanWork committed Aug 21, 2024
1 parent 2f8e97f commit d9b5cae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_prompters.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ def test_prompt_style_w_instruct(self):
assert "USER:" not in res
assert "ASSISTANT:" not in res

def test_prompt_style_w_phi(self):
prompter = AlpacaPrompter(prompt_style=PromptStyle.PHI.value)
res = next(
prompter.build_prompt("tell me a joke about the following", "alpacas")
)
assert """<|system|>Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.<|end|>"""


def test_prompt_style_w_chat(self):
prompter = AlpacaPrompter(prompt_style=PromptStyle.CHAT.value)
res = next(
Expand Down

0 comments on commit d9b5cae

Please sign in to comment.