hysts HF staff commited on
Commit
5460ebb
1 Parent(s): 84e2126
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -21,7 +21,7 @@ def get_prompt(message: str, chat_history: list[tuple[str, str]],
21
  system_prompt: str) -> str:
22
  texts = [f'[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n']
23
  for user_input, response in chat_history:
24
- texts.append(f'{user_input} [/INST] {response} </s><s> [INST] ')
25
  texts.append(f'{message.strip()} [/INST]')
26
  return ''.join(texts)
27
 
 
21
  system_prompt: str) -> str:
22
  texts = [f'[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n']
23
  for user_input, response in chat_history:
24
+ texts.append(f'{user_input.strip()} [/INST] {response.strip()} </s><s> [INST] ')
25
  texts.append(f'{message.strip()} [/INST]')
26
  return ''.join(texts)
27