yannsay commited on
Commit
f60f61e
·
verified ·
1 Parent(s): 076bd5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -34,13 +34,16 @@ 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 get_ensoillement(location:str)-> str: #it's import to specify the return type
38
  #Keep this format for the description / args / args description but feel free to modify the tool
39
  """A tool that does nothing yet
40
  Args:
41
- location: A string representing the location
42
  """
43
- return DuckDuckGoSearchTool(f"ensoillement{location}")
 
 
 
44
 
45
 
46
  final_answer = FinalAnswerTool()
 
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  @tool
37
+ def web_search(query:str)-> str: #it's import to specify the return type
38
  #Keep this format for the description / args / args description but feel free to modify the tool
39
  """A tool that does nothing yet
40
  Args:
41
+ query: A string representing the query to search
42
  """
43
+ try:
44
+ DuckDuckGoSearchTool(web_search)
45
+ except Exce as e:
46
+ return "Cannot use this tool"
47
 
48
 
49
  final_answer = FinalAnswerTool()