kcarnold commited on
Commit
17c6afc
·
1 Parent(s): f25d13f

fix another state-management bug

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -221,7 +221,7 @@ def type_assistant_response():
221
  for i, message in enumerate(st.session_state.messages[:-1]):
222
  with st.chat_message(message["role"]):
223
  st.markdown(message["content"])
224
- st.button("Edit", on_click=rewind_to, args=(i,))
225
 
226
  # Display message-in-progress in chat message container
227
  last_role = messages[-1]["role"]
 
221
  for i, message in enumerate(st.session_state.messages[:-1]):
222
  with st.chat_message(message["role"]):
223
  st.markdown(message["content"])
224
+ st.button("Edit", on_click=rewind_to, args=(i,), key=f"rewind_to_{i}")
225
 
226
  # Display message-in-progress in chat message container
227
  last_role = messages[-1]["role"]