Spaces:
Build error
Build error
Update components/chat.py
Browse files- components/chat.py +3 -2
components/chat.py
CHANGED
|
@@ -113,8 +113,9 @@ def display_chat_interface():
|
|
| 113 |
})
|
| 114 |
|
| 115 |
if response:
|
| 116 |
-
#
|
| 117 |
-
|
|
|
|
| 118 |
ai_message = AIMessage(content=cleaned_response)
|
| 119 |
st.session_state.messages.append(ai_message)
|
| 120 |
st.rerun()
|
|
|
|
| 113 |
})
|
| 114 |
|
| 115 |
if response:
|
| 116 |
+
# Extract the content and then clean the response
|
| 117 |
+
response_content = response.content
|
| 118 |
+
cleaned_response = clean_response_content(response_content)
|
| 119 |
ai_message = AIMessage(content=cleaned_response)
|
| 120 |
st.session_state.messages.append(ai_message)
|
| 121 |
st.rerun()
|