Update app.py
Browse files
app.py
CHANGED
@@ -253,10 +253,11 @@ def chat():
|
|
253 |
return jsonify({'reply': reply})
|
254 |
try:
|
255 |
chat_history = get_chat_history() if firebase_enabled else []
|
256 |
-
logger.info("
|
257 |
except Exception as e:
|
258 |
logger.error(f"Failed to retrieve chat history from Firebase: {str(e)}")
|
259 |
chat_history = []
|
|
|
260 |
return render_template('chat.html', chat_history=chat_history)
|
261 |
except Exception as e:
|
262 |
logger.error(f"Error in /chat route: {str(e)}")
|
|
|
253 |
return jsonify({'reply': reply})
|
254 |
try:
|
255 |
chat_history = get_chat_history() if firebase_enabled else []
|
256 |
+
logger.info(f"Retrieved chat history: {chat_history}")
|
257 |
except Exception as e:
|
258 |
logger.error(f"Failed to retrieve chat history from Firebase: {str(e)}")
|
259 |
chat_history = []
|
260 |
+
# Log the error but continue to render the page
|
261 |
return render_template('chat.html', chat_history=chat_history)
|
262 |
except Exception as e:
|
263 |
logger.error(f"Error in /chat route: {str(e)}")
|