Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -155,10 +155,6 @@ if "OPENAI_API_KEY" in os.environ:
|
|
155 |
full_response = response
|
156 |
message_placeholder.markdown(full_response)
|
157 |
|
158 |
-
except Exception as e:
|
159 |
-
error_message = f"I apologize, but I encountered an error while processing your request. Please try rephrasing your question or ask something else. Error details: {str(e)}"
|
160 |
-
message_placeholder.markdown(error_message)
|
161 |
-
full_response = error_message
|
162 |
|
163 |
# Add assistant response to chat history
|
164 |
st.session_state.messages.append({"role": "assistant", "content": full_response})
|
|
|
155 |
full_response = response
|
156 |
message_placeholder.markdown(full_response)
|
157 |
|
|
|
|
|
|
|
|
|
158 |
|
159 |
# Add assistant response to chat history
|
160 |
st.session_state.messages.append({"role": "assistant", "content": full_response})
|