JirasakJo commited on
Commit
c00bacb
·
verified ·
1 Parent(s): a744d7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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": assistant_answer})
264
 
265
  # Save to QA history
266
- add_to_qa_history(user_query, assistant_answer)
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)}"))