BetsyFromR commited on
Commit
6c9620d
·
verified ·
1 Parent(s): 5bc1570

Update app.py

Browse files

add search tool

Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -28,6 +28,16 @@ def web_search(query:str)-> str:
28
  result = search.run(query)
29
  return result
30
 
 
 
 
 
 
 
 
 
 
 
31
  @tool
32
  def get_current_time_in_timezone(timezone: str) -> str:
33
  """A tool that fetches the current local time in a specified timezone.
 
28
  result = search.run(query)
29
  return result
30
 
31
+ @tool
32
+ def search(query:str)-> str:
33
+ """A tool that performs search in internet.
34
+ Args:
35
+ query: search query
36
+ """
37
+ search = DuckDuckGoSearchRun()
38
+ result = search.run(query)
39
+ return result
40
+
41
  @tool
42
  def get_current_time_in_timezone(timezone: str) -> str:
43
  """A tool that fetches the current local time in a specified timezone.