rwitz commited on
Commit
42a3d2e
·
1 Parent(s): cf49370

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,10 +28,10 @@ def write_elo_ratings(elo_ratings):
28
 
29
  # Function to get bot response
30
  def format_chatml_prompt(state):
31
- chatml_prompt = ""
32
  for message in state["history"]:
33
  chatml_prompt += "|im_start|"+message['role']+": "+ message['content']+"|im_end|\n"
34
- return chatml_prompt+"|im_start|Assistant:"
35
  def get_bot_response(url, prompt,state):
36
  chatml_prompt = format_chatml_prompt(state)
37
  payload = {
 
28
 
29
  # Function to get bot response
30
  def format_chatml_prompt(state):
31
+ chatml_prompt = "<s>"
32
  for message in state["history"]:
33
  chatml_prompt += "|im_start|"+message['role']+": "+ message['content']+"|im_end|\n"
34
+ return chatml_prompt+"|im_start|Assistant: "
35
  def get_bot_response(url, prompt,state):
36
  chatml_prompt = format_chatml_prompt(state)
37
  payload = {