Spaces:
Runtime error
Runtime error
Commit
·
da39b49
1
Parent(s):
6b2e087
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,8 +50,8 @@ if prompt := st.chat_input("Ask me anything.."):
|
|
| 50 |
# Display assistant response in chat message container
|
| 51 |
with st.chat_message("Jojo"):
|
| 52 |
st.markdown(response)
|
| 53 |
-
memory.save_context({"question":prompt}, {"output":prompt})
|
| 54 |
-
memory.chat_memory.messages = memory.chat_memory.messages[-15:]
|
| 55 |
# Add assistant response to chat history
|
| 56 |
st.session_state.messages.append({"role": "Jojo", "content": response})
|
| 57 |
|
|
|
|
| 50 |
# Display assistant response in chat message container
|
| 51 |
with st.chat_message("Jojo"):
|
| 52 |
st.markdown(response)
|
| 53 |
+
st.session_state.memory.save_context({"question":prompt}, {"output":prompt})
|
| 54 |
+
st.session_state.memory.chat_memory.messages = st.session_state.memory.chat_memory.messages[-15:]
|
| 55 |
# Add assistant response to chat history
|
| 56 |
st.session_state.messages.append({"role": "Jojo", "content": response})
|
| 57 |
|