Update utils.py
Browse files
utils.py
CHANGED
@@ -261,17 +261,12 @@ def format_prompt(message, history):
|
|
261 |
User: Lets turn up the music and have some fun!
|
262 |
LLM Response: Party
|
263 |
"""
|
264 |
-
prompt =
|
265 |
-
"<s>[INST]" + system_message + "[/INST]"
|
266 |
-
)
|
267 |
for user_prompt, bot_response in history:
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
if message=="":
|
273 |
-
message="Hello"
|
274 |
-
prompt += f"[INST] {message} [/INST]"
|
275 |
return prompt
|
276 |
|
277 |
def generate_llm_output(
|
|
|
261 |
User: Lets turn up the music and have some fun!
|
262 |
LLM Response: Party
|
263 |
"""
|
264 |
+
prompt = f"<s>{fixed_prompt}"
|
|
|
|
|
265 |
for user_prompt, bot_response in history:
|
266 |
+
prompt += f"\n User:{user_prompt}\n LLM Response:{bot_response}"
|
267 |
+
|
268 |
+
# Add the current message
|
269 |
+
prompt += f"\nUser: {message}\nLLM Response:"
|
|
|
|
|
|
|
270 |
return prompt
|
271 |
|
272 |
def generate_llm_output(
|