Spaces:
Running
on
Zero
Running
on
Zero
Update
Browse files
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 |
|