Update app.py
Browse files
app.py
CHANGED
@@ -6,11 +6,10 @@ client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.3")
|
|
6 |
|
7 |
# Function to format the conversation history
|
8 |
def format_prompt(message, history):
|
9 |
-
prompt = "<s>"
|
10 |
for user_prompt, bot_response in history:
|
11 |
-
|
12 |
-
|
13 |
-
prompt += f"[INST] {message} [/INST]" # Add the latest user message
|
14 |
return prompt
|
15 |
|
16 |
# Text generation function with parameters
|
|
|
6 |
|
7 |
# Function to format the conversation history
|
8 |
def format_prompt(message, history):
|
9 |
+
prompt = "<s>"
|
10 |
for user_prompt, bot_response in history:
|
11 |
+
prompt += f"[INST] {user_prompt} [/INST] {bot_response} "
|
12 |
+
prompt += f"[INST] {message} [/INST]</s>"
|
|
|
13 |
return prompt
|
14 |
|
15 |
# Text generation function with parameters
|