ONEROCKS commited on
Commit
0f50870
·
verified ·
1 Parent(s): adeb6db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -80,11 +80,7 @@ def chat_with_ai(message, history, role):
80
  return history
81
 
82
  except Exception as e:
83
- if hasattr(e, 'response') and e.response is not None:
84
- error_msg = f"Error: {e.response.text}"
85
- else:
86
- error_msg = f"Error: {str(e)}"
87
- history.append((message, error_msg))
88
  return history
89
 
90
  def create_chatbot():
 
80
  return history
81
 
82
  except Exception as e:
83
+ history.append((message, f"Error: {str(e)}"))
 
 
 
 
84
  return history
85
 
86
  def create_chatbot():