Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,6 +19,13 @@ if checkpoint == "mistralai/Mistral-7B-Instruct-v0.2":
|
|
| 19 |
chat_template = open("mistral-instruct.jinja").read()
|
| 20 |
chat_template = chat_template.replace(' ', '').replace('\n', '')
|
| 21 |
tokenizer.chat_template = chat_template
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
def format_prompt(message, chatbot, system_prompt):
|
|
|
|
| 19 |
chat_template = open("mistral-instruct.jinja").read()
|
| 20 |
chat_template = chat_template.replace(' ', '').replace('\n', '')
|
| 21 |
tokenizer.chat_template = chat_template
|
| 22 |
+
additionalSystemPrompt = """
|
| 23 |
+
# Assistant response:
|
| 24 |
+
- Your response must only contain your direct speech and nothing else.
|
| 25 |
+
- Make sure that your responses are not too long.
|
| 26 |
+
- Your responses must have a maximum length of 3 sentences.
|
| 27 |
+
- Your response must not contain any text except for your direct speech.
|
| 28 |
+
"""
|
| 29 |
|
| 30 |
|
| 31 |
def format_prompt(message, chatbot, system_prompt):
|