chatml the system message
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def user(message, history):
|
|
32 |
def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
33 |
history = history or []
|
34 |
|
35 |
-
messages = BASE_SYSTEM_MESSAGE + system_message.strip() + "
|
36 |
"\n".join(["\n".join(["<|im_start|>"+"user\n"+item[0]+"<|im_end|>", "<|im_start|>assistant\n"+item[1]+"<|im_end|>"])
|
37 |
for item in history])
|
38 |
# strip the last `<|end_of_turn|>` from the messages
|
|
|
32 |
def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
33 |
history = history or []
|
34 |
|
35 |
+
messages = "<|im_start|>"+"system\n" + BASE_SYSTEM_MESSAGE + system_message.strip() + "<|im_end|>\n" + \
|
36 |
"\n".join(["\n".join(["<|im_start|>"+"user\n"+item[0]+"<|im_end|>", "<|im_start|>assistant\n"+item[1]+"<|im_end|>"])
|
37 |
for item in history])
|
38 |
# strip the last `<|end_of_turn|>` from the messages
|