fix: prompt phi (#1845) [skip ci]
* corecting phi system prompt * phi test * update * add test
This commit is contained in:
@@ -42,6 +42,19 @@ class AlpacaPrompterTest(unittest.TestCase):
|
||||
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"))
|
||||
assert (
|
||||
"""<|system|>
|
||||
Below is an instruction that describes a task. Write a response that appropriately completes the request.<|end|>
|
||||
<|user|>
|
||||
tell me a joke about the following<|end|>
|
||||
<|assistant|>
|
||||
"""
|
||||
== res
|
||||
)
|
||||
|
||||
def test_prompt_style_w_chat(self):
|
||||
prompter = AlpacaPrompter(prompt_style=PromptStyle.CHAT.value)
|
||||
res = next(
|
||||
|
||||
Reference in New Issue
Block a user