Update app.py
Browse files
app.py
CHANGED
@@ -260,10 +260,10 @@ def handle_submit(user_query: str):
|
|
260 |
|
261 |
# Update chat history and context
|
262 |
st.session_state.chat_history.append(("assistant", response_dict))
|
263 |
-
st.session_state.context_memory.append({"query": user_query, "answer":
|
264 |
|
265 |
# Save to QA history
|
266 |
-
add_to_qa_history(user_query,
|
267 |
|
268 |
except Exception as e:
|
269 |
st.session_state.chat_history.append(("assistant", f"❌ เกิดข้อผิดพลาด: {str(e)}"))
|
|
|
260 |
|
261 |
# Update chat history and context
|
262 |
st.session_state.chat_history.append(("assistant", response_dict))
|
263 |
+
st.session_state.context_memory.append({"query": user_query, "answer": response_dict})
|
264 |
|
265 |
# Save to QA history
|
266 |
+
add_to_qa_history(user_query, response_dict)
|
267 |
|
268 |
except Exception as e:
|
269 |
st.session_state.chat_history.append(("assistant", f"❌ เกิดข้อผิดพลาด: {str(e)}"))
|