Spaces:
Paused
Paused
Update components/chat.py
Browse files- components/chat.py +3 -6
components/chat.py
CHANGED
|
@@ -26,7 +26,7 @@ def clean_response_content(response_content):
|
|
| 26 |
def display_chat_interface():
|
| 27 |
"""Display modern chat interface with clean formatting."""
|
| 28 |
|
| 29 |
-
[Previous CSS styling remains the same...]
|
| 30 |
|
| 31 |
# Check if QA system is initialized
|
| 32 |
if 'qa_system' not in st.session_state or st.session_state.qa_system is None:
|
|
@@ -86,7 +86,7 @@ def display_chat_interface():
|
|
| 86 |
# Get response
|
| 87 |
response = st.session_state.qa_system.invoke({
|
| 88 |
"input": prompt,
|
| 89 |
-
"chat_history": st.session_state.messages
|
| 90 |
})
|
| 91 |
|
| 92 |
if response:
|
|
@@ -100,7 +100,4 @@ def display_chat_interface():
|
|
| 100 |
except Exception as e:
|
| 101 |
st.error(f"Error: {e}")
|
| 102 |
import traceback
|
| 103 |
-
st.error(traceback.format_exc())
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
| 26 |
def display_chat_interface():
|
| 27 |
"""Display modern chat interface with clean formatting."""
|
| 28 |
|
| 29 |
+
# [Previous CSS styling remains the same...]
|
| 30 |
|
| 31 |
# Check if QA system is initialized
|
| 32 |
if 'qa_system' not in st.session_state or st.session_state.qa_system is None:
|
|
|
|
| 86 |
# Get response
|
| 87 |
response = st.session_state.qa_system.invoke({
|
| 88 |
"input": prompt,
|
| 89 |
+
"chat_history": st.session_state.messages # This line had an extra comma
|
| 90 |
})
|
| 91 |
|
| 92 |
if response:
|
|
|
|
| 100 |
except Exception as e:
|
| 101 |
st.error(f"Error: {e}")
|
| 102 |
import traceback
|
| 103 |
+
st.error(traceback.format_exc())
|
|
|
|
|
|
|
|
|