keenanjt commited on
Commit
09b3f0c
·
verified ·
1 Parent(s): 6a3dea2

removed get_user_input function

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -32,20 +32,20 @@ def get_current_time_in_timezone(timezone: str) -> str:
32
  return f"The current local time in {timezone} is: {local_time}"
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
-
36
  @tool
37
  def get_user_input(user_input: str) -> str:
38
- """A tool that ask the user for input, so you can use that input for other functions
39
  Args:
40
  user_input: A string representing their input
41
- """
42
  try:
43
  user_input = input("Enter something: ")
44
  # Process the input
45
  return user_input
46
  except EOFError:
47
  print("End of input reached.")
48
-
49
 
50
  final_answer = FinalAnswerTool()
51
  web_search = DuckDuckGoSearchTool()
@@ -71,7 +71,7 @@ with open("prompts.yaml", 'r') as stream:
71
 
72
  agent = CodeAgent(
73
  model=model,
74
- tools=[final_answer, web_search, get_current_time_in_timezone, visit_webpage, get_user_input], ## add your tools here (don't remove final answer)
75
  max_steps=6,
76
  verbosity_level=1,
77
  grammar=None,
 
32
  return f"The current local time in {timezone} is: {local_time}"
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
+ """
36
  @tool
37
  def get_user_input(user_input: str) -> str:
38
+ "A tool that ask the user for input, so you can use that input for other functions
39
  Args:
40
  user_input: A string representing their input
41
+ "
42
  try:
43
  user_input = input("Enter something: ")
44
  # Process the input
45
  return user_input
46
  except EOFError:
47
  print("End of input reached.")
48
+ """
49
 
50
  final_answer = FinalAnswerTool()
51
  web_search = DuckDuckGoSearchTool()
 
71
 
72
  agent = CodeAgent(
73
  model=model,
74
+ tools=[final_answer, web_search, get_current_time_in_timezone, visit_webpage """,get_user_input"""], ## add your tools here (don't remove final answer)
75
  max_steps=6,
76
  verbosity_level=1,
77
  grammar=None,