Spaces:
Running
Running
added conditional that only remembers history if user says so
Browse files
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)
|