winglian commited on
Commit
3ae5197
1 Parent(s): 2ba20aa

chatml the system message

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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() + "\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
 
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