syedmudassir16 commited on
Commit
4ef4043
·
verified ·
1 Parent(s): 45f2adf

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +5 -10
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
- if user_prompt is not None:
269
- prompt += f"[INST] {user_prompt} [/INST]"
270
- prompt += f" {bot_response}</s> "
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(