cryogenic22 commited on
Commit
6891ce1
·
verified ·
1 Parent(s): 8b27649

Update components/chat.py

Browse files
Files changed (1) hide show
  1. components/chat.py +5 -2
components/chat.py CHANGED
@@ -17,8 +17,11 @@ def display_chat_interface():
17
  if prompt := st.chat_input("Ask about the RFPs..."):
18
  try:
19
  with st.spinner("Analyzing documents..."):
20
- # Get response from QA system
21
- response = st.session_state.qa_system({"question": prompt})
 
 
 
22
 
23
  # Add messages to chat history
24
  st.session_state.chat_history.append(HumanMessage(content=prompt))
 
17
  if prompt := st.chat_input("Ask about the RFPs..."):
18
  try:
19
  with st.spinner("Analyzing documents..."):
20
+ # Get response from QA system with correct input key
21
+ response = st.session_state.qa_system({
22
+ "input": prompt, # Changed from "question" to "input"
23
+ "chat_history": st.session_state.chat_history
24
+ })
25
 
26
  # Add messages to chat history
27
  st.session_state.chat_history.append(HumanMessage(content=prompt))