martinjolif commited on
Commit
9f6fd5b
·
verified ·
1 Parent(s): 0983cc2

correct web search tool

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -17,15 +17,7 @@ def get_addition_between_two_numbers(x:float, y:float)-> float:
17
  """
18
  return x+y
19
 
20
- @tool
21
- def get_search_on_internet(search_request: str) -> str:
22
- """A tool that search something on internet.
23
- Args:
24
- search_request: a string which corresponds to the search request to do
25
- """
26
- web_search_tool = DuckDuckGoSearchTool(max_results=3, rate_limit=2.0)
27
- results = web_search_tool(search_request)
28
- return results
29
 
30
 
31
  @tool
@@ -67,7 +59,7 @@ agent = CodeAgent(
67
  model=model,
68
  tools=[final_answer,
69
  get_addition_between_two_numbers,
70
- get_search_on_internet,
71
  get_current_time_in_timezone,
72
  image_generation_tool
73
  ], ## add your tools here (don't remove final answer)
 
17
  """
18
  return x+y
19
 
20
+ search_web = DuckDuckGoSearchTool()
 
 
 
 
 
 
 
 
21
 
22
 
23
  @tool
 
59
  model=model,
60
  tools=[final_answer,
61
  get_addition_between_two_numbers,
62
+ search_web,
63
  get_current_time_in_timezone,
64
  image_generation_tool
65
  ], ## add your tools here (don't remove final answer)