Spaces:
Runtime error
Runtime error
reset chat history
Browse files
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
|