Spaces:
Runtime error
Runtime error
xlr8
commited on
Commit
·
8316353
1
Parent(s):
defdef0
use correct system prompt formatting with chatml
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ def generate_response(message, history, initial_prompt, user_role, assistant_rol
|
|
70 |
formatted_input = format_chat(chat_history, use_chatml)
|
71 |
|
72 |
if use_chatml:
|
73 |
-
full_prompt = initial_prompt + "
|
74 |
else:
|
75 |
full_prompt = initial_prompt + "\n\n" + formatted_input + f"<{assistant_role}>:"
|
76 |
|
|
|
70 |
formatted_input = format_chat(chat_history, use_chatml)
|
71 |
|
72 |
if use_chatml:
|
73 |
+
full_prompt = "<|im_start|>system\n" + initial_prompt + "<|im_end|>\n" + formatted_input + f"<|im_start|>{assistant_role}\n"
|
74 |
else:
|
75 |
full_prompt = initial_prompt + "\n\n" + formatted_input + f"<{assistant_role}>:"
|
76 |
|