anandaa commited on
Commit
035f498
β€’
1 Parent(s): fd2188b

reset chat history

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -15,6 +15,8 @@ def add_text(history, text):
15
  def process_input(history):
16
  inp = history[-1][0]
17
  # response = "I have received your input, which is: \n" + inp
 
 
18
  response = chat_bot.chat(inp)
19
  history[-1][1] = response
20
  return history
 
15
  def process_input(history):
16
  inp = history[-1][0]
17
  # response = "I have received your input, which is: \n" + inp
18
+ if len(history) == 1:
19
+ chat_bot.reset_context()
20
  response = chat_bot.chat(inp)
21
  history[-1][1] = response
22
  return history