TierraX commited on
Commit
b8316fe
·
verified ·
1 Parent(s): 8a07dc4

Update app.py

Browse files

Removed max_results parameter, which is not supported by DuckDuckGoSearch and caused error

Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,19 +9,18 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def web_search(query: str, max_results: int = 3) -> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
  """A tool that performs web searches using DuckDuckGo
15
  Args:
16
  query: The search query string
17
- max_results: Maximum number of results (default = 3)
18
  """
19
  try:
20
  # Create instance of DuckDuckGoSearchTool
21
  search_tool = DuckDuckGoSearchTool()
22
 
23
  # Perform the search
24
- results = search_tool(query, max_results=max_results)
25
 
26
  # Format the results
27
  formatted_results = []
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def web_search(query: str) -> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
  """A tool that performs web searches using DuckDuckGo
15
  Args:
16
  query: The search query string
 
17
  """
18
  try:
19
  # Create instance of DuckDuckGoSearchTool
20
  search_tool = DuckDuckGoSearchTool()
21
 
22
  # Perform the search
23
+ results = search_tool(query)
24
 
25
  # Format the results
26
  formatted_results = []