ColeGuion commited on
Commit
ca29043
·
verified ·
1 Parent(s): c19bbe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -11,7 +11,8 @@ def format_prompt(message, history):
11
  # Iterates through every past user input and response to be added to the prompt
12
  for user_prompt, bot_response in history:
13
  prompt += prompt_template.format(user_prompt)
14
- prompt += f" {bot_response} </s> "
 
15
 
16
  prompt += prompt_template.format(message)
17
  return prompt
 
11
  # Iterates through every past user input and response to be added to the prompt
12
  for user_prompt, bot_response in history:
13
  prompt += prompt_template.format(user_prompt)
14
+ if bot_response[-3:] == "```": bot_response += "\n"
15
+ prompt += f" {bot_response}</s> "
16
 
17
  prompt += prompt_template.format(message)
18
  return prompt