Spaces:
Build error
Build error
File size: 398 Bytes
837e221 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from smolagents import tool
from smolagents.default_tools import DuckDuckGoSearchTool
@tool
def web_search(query: str) -> str:
"""
Search the web for information.
Args:
query: Search query to find information
Returns:
Search results as text
"""
search_tool = DuckDuckGoSearchTool(max_results=3)
results = search_tool.execute(query)
return results
|