Spaces:
Runtime error
Runtime error
Update app.py
Browse files84 unmodified lines858687888990919284 unmodified linesresponse = "I'm sorry, but I couldn't generate a response. Can you rephrase your question?"# ✅ Preserve conversation historyst.session_state.chat_history.append({'role': 'user', 'content': user_text})st.session_state.chat_history.append({'role': 'assistant', 'content': response})return response, st.session_state.chat_history84 unmodified lines85868788899091929384 unmodified linesresponse = "I'm sorry, but I couldn't generate a response. Can you rephrase your question?"# ✅ Preserve conversation historychat_history.append({'role': 'user', 'content': user_text})chat_history.append({'role': 'assistant', 'content': response})st.session_state.chat_history = chat_history # ✅ Update session state historyreturn response, st.session_state.chat_history
app.py+3-2