Spaces:
Paused
Paused
Update components/chat.py
Browse files- 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({
|
|
|
|
|
|
|
|
|
|
| 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))
|