Update run.py
Browse files
run.py
CHANGED
@@ -87,12 +87,15 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
87 |
|
88 |
|
89 |
def format_prompt(message, history):
|
90 |
-
print("
|
91 |
print(history)
|
92 |
prompt = "" #"<s>"
|
|
|
93 |
for user_prompt, bot_response in history:
|
94 |
-
|
95 |
-
|
|
|
|
|
96 |
prompt += f"[INST] {message} [/INST]"
|
97 |
print("Final P")
|
98 |
print(prompt)
|
|
|
87 |
|
88 |
|
89 |
def format_prompt(message, history):
|
90 |
+
print("HISTORY")
|
91 |
print(history)
|
92 |
prompt = "" #"<s>"
|
93 |
+
c=1
|
94 |
for user_prompt, bot_response in history:
|
95 |
+
if c<2:
|
96 |
+
prompt += f"[INST] {user_prompt} [/INST]"
|
97 |
+
prompt += f" {bot_response}</s> "
|
98 |
+
c=c+1
|
99 |
prompt += f"[INST] {message} [/INST]"
|
100 |
print("Final P")
|
101 |
print(prompt)
|