Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -564,6 +564,8 @@ def clean_response(response_text):
|
|
564 |
|
565 |
|
566 |
|
|
|
|
|
567 |
def generate_answer(message, choice, retrieval_mode, selected_model):
|
568 |
logging.debug(f"generate_answer called with choice: {choice} and retrieval_mode: {retrieval_mode}")
|
569 |
|
@@ -632,7 +634,9 @@ def generate_answer(message, choice, retrieval_mode, selected_model):
|
|
632 |
return "Invalid retrieval mode selected.", []
|
633 |
|
634 |
except Exception as e:
|
635 |
-
|
|
|
|
|
636 |
return "Sorry, I encountered an error while processing your request.", []
|
637 |
|
638 |
|
|
|
564 |
|
565 |
|
566 |
|
567 |
+
import traceback
|
568 |
+
|
569 |
def generate_answer(message, choice, retrieval_mode, selected_model):
|
570 |
logging.debug(f"generate_answer called with choice: {choice} and retrieval_mode: {retrieval_mode}")
|
571 |
|
|
|
634 |
return "Invalid retrieval mode selected.", []
|
635 |
|
636 |
except Exception as e:
|
637 |
+
# Log the error details
|
638 |
+
logging.error(f"Error in generate_answer: {str(e)}")
|
639 |
+
logging.error(traceback.format_exc())
|
640 |
return "Sorry, I encountered an error while processing your request.", []
|
641 |
|
642 |
|