LordFarquaad42 commited on
Commit
9f9e34c
1 Parent(s): 64c7a8a

added conditional that only remembers history if user says so

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -56,7 +56,7 @@ if st.button('Query Database') & (access_key != "") & (user_question != ""):
56
  temperature=temperature
57
  )
58
 
59
- history.append({user_question : response.choices[0].message.content})
60
 
61
  st.header("Prof Says ...")
62
  st.write(response.choices[0].message.content)
 
56
  temperature=temperature
57
  )
58
 
59
+ history.append({user_question : response.choices[0].message.content} if remember_chat_history else {})
60
 
61
  st.header("Prof Says ...")
62
  st.write(response.choices[0].message.content)