Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 = {
|