odrec commited on
Commit
809ef31
·
verified ·
1 Parent(s): 20dbe65

Get rid of max_results variable for web search

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -20,14 +20,13 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
20
 
21
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
22
  @tool
23
- def web_search(search_query:str, max_results:int)-> str:
24
- """A tool that does web search using a query and max number number of results
25
  Args:
26
  search_query: a string for a search query
27
- max_results: the maximum number of results to gather for the prompt
28
  """
29
  search_tool = DuckDuckGoSearchTool()
30
- return search_tool(search_query, max_results=max_results)
31
 
32
  @tool
33
  def get_current_time_in_timezone(timezone: str) -> str:
 
20
 
21
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
22
  @tool
23
+ def web_search(search_query:str)-> str:
24
+ """A tool that does web search using a query
25
  Args:
26
  search_query: a string for a search query
 
27
  """
28
  search_tool = DuckDuckGoSearchTool()
29
+ return search_tool(search_query)
30
 
31
  @tool
32
  def get_current_time_in_timezone(timezone: str) -> str: