Caerii commited on
Commit
5d0877b
·
verified ·
1 Parent(s): f959ad0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- print(f"An error occurred: {e}")
 
 
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