acecalisto3 commited on
Commit
624b560
1 Parent(s): 4afef10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -311,13 +311,11 @@ class AIAgent:
311
  """
312
  Handles user input and executes the corresponding action.
313
  """
314
- try:
315
- action, *args = input_str.split()
316
- if action in self.tools:
317
- if args:
318
- self.task_history.append({
319
- "action": action,
320
- "input": " ".join(args),
321
  "output": self.tools[action](" ".join(args))
322
  })
323
  else:
 
311
  """
312
  Handles user input and executes the corresponding action.
313
  """
314
+ if input_str:
315
+ action, *args = input_str.split()
316
+ else:
317
+ # Handle empty input (e.g., display a message or do nothing)
318
+ print("Please provide input.")
 
 
319
  "output": self.tools[action](" ".join(args))
320
  })
321
  else: