Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,9 @@ def openai_chatbot(message, history=None):
|
|
| 43 |
|
| 44 |
return history_formatted, conversation_history # Return the formatted history and the raw history
|
| 45 |
except Exception as e:
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
# Return the error message and the existing history so the error message doesn't get appended
|
| 48 |
return "Sorry, there was an error processing your request.", history
|
| 49 |
|
|
|
|
| 43 |
|
| 44 |
return history_formatted, conversation_history # Return the formatted history and the raw history
|
| 45 |
except Exception as e:
|
| 46 |
+
tb = traceback.format_exc() # This will give you the traceback as a string
|
| 47 |
+
error_message = f"An error occurred: {e}\n{tb}"
|
| 48 |
+
print(error_message)
|
| 49 |
# Return the error message and the existing history so the error message doesn't get appended
|
| 50 |
return "Sorry, there was an error processing your request.", history
|
| 51 |
|