DenverJones commited on
Commit
faac9df
·
verified ·
1 Parent(s): 1ce17a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -69,11 +69,10 @@ agent = initialize_agent(
69
 
70
 
71
  def chat_with_agent(user_input, history):
72
- if not user_input.strip():
73
- return history + [{"role": "assistant", "content": "Please enter a message to start the conversation!"}]
74
 
75
  try:
76
- bot_response = agent.run(user_input)
77
  except Exception as e:
78
  bot_response = f"Sorry, an error occurred: {e}"
79
 
 
69
 
70
 
71
  def chat_with_agent(user_input, history):
72
+ # ... (rest of the function)
 
73
 
74
  try:
75
+ bot_response = agent(user_input) # Use agent(user_input) or agent.invoke(user_input)
76
  except Exception as e:
77
  bot_response = f"Sorry, an error occurred: {e}"
78