Update run.py
Browse files
run.py
CHANGED
@@ -88,9 +88,9 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
88 |
|
89 |
def format_prompt(message, history):
|
90 |
prompt = "" #"<s>"
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
prompt += f"[INST] {message} [/INST]"
|
95 |
return prompt
|
96 |
|
|
|
88 |
|
89 |
def format_prompt(message, history):
|
90 |
prompt = "" #"<s>"
|
91 |
+
for user_prompt, bot_response in history:
|
92 |
+
prompt += f"[INST] {user_prompt} [/INST]"
|
93 |
+
prompt += f" {bot_response}</s> "
|
94 |
prompt += f"[INST] {message} [/INST]"
|
95 |
return prompt
|
96 |
|