dorayaki78 commited on
Commit
ec7c16e
·
verified ·
1 Parent(s): f65c81d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -34,17 +34,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
- def surf_internet(question:str)->str:
38
  """A tool that fetches the search queries to a search engine
39
  Args:
40
- question: A string representing the search queries (e.g., 'Who is the name of Indonesian third president)'
41
  """
42
  try:
43
  # Create timezone object
44
- ans = DuckDuckGoSearchTool(question)
45
- return f"The answer for {question} is: {ans}"
46
  except Exception as e:
47
- return f"Error fetching time for the online answer for': {question}"
48
 
49
  final_answer = FinalAnswerTool()
50
 
 
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
+ def search(query:str)->str:
38
  """A tool that fetches the search queries to a search engine
39
  Args:
40
+ query: A string representing the search queries (e.g., 'Who is the name of Indonesian third president)'
41
  """
42
  try:
43
  # Create timezone object
44
+ ans = DuckDuckGoSearchTool(query)
45
+ return f"The answer for {query} is: {ans}"
46
  except Exception as e:
47
+ return f"Error fetching time for the online answer for': {query}"
48
 
49
  final_answer = FinalAnswerTool()
50