tr3n1ttty commited on
Commit
abf4b40
·
1 Parent(s): 44d76ba

another format(v4) for prompt

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,8 @@ def predict(message, history):
22
  history_transformer_format = history + [[message, ""]]
23
  stop = StopOnTokens()
24
 
25
- messages = "".join(["".join(["\n<human>:"+item[0], "\n<bot>:"+item[1]])
 
26
  for item in history_transformer_format])
27
  print("MESSAGES: ", messages)
28
 
 
22
  history_transformer_format = history + [[message, ""]]
23
  stop = StopOnTokens()
24
 
25
+ messages = "".join(["".join(["<|start_header_id|>user<|end_header_id|>\n"+item[0],
26
+ "<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n"+item[1]])
27
  for item in history_transformer_format])
28
  print("MESSAGES: ", messages)
29