csponchiado commited on
Commit
10abeea
·
verified ·
1 Parent(s): 3988d96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -33,6 +33,19 @@ def get_current_time_in_timezone(timezone: str) -> str:
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  final_answer = FinalAnswerTool()
38
  model = HfApiModel(
 
33
  except Exception as e:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
+ @tool
37
+ def do_search_usint_search_term(query: str) -> str:
38
+ """A tool that do a search in the internet.
39
+ Args:
40
+ query: A string representing a search terms (e.g., 'brazil, foods, economy, etc').
41
+ """
42
+ try:
43
+
44
+ search_tool = DuckDuckGoSearchTool()
45
+ return search_tool(query)
46
+ except Exception as e:
47
+ return f"Error fetching results '{query}': {str(e)}"
48
+
49
 
50
  final_answer = FinalAnswerTool()
51
  model = HfApiModel(