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

Update app.py

Browse files

Update of search function so the tool uses __call__ method instead of search attribute, which causes error

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ def web_search(query: str, max_results: int = 3) -> str: #it's import to specify
21
  search_tool = DuckDuckGoSearchTool()
22
 
23
  # Perform the search
24
- results = search_tool.search(query, max_results=max_results)
25
 
26
  # Format the results
27
  formatted_results = []
 
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 = []