Spaces:
Build error
Build error
Enhance agent functionality in main_v2.py by adding WikipediaSearchTool and updating DuckDuckGoSearchTool and VisitWebpageTool parameters. Modify agent initialization to accommodate new tools and increase max results and output length. Update requirements.txt to include Wikipedia-API dependency. Refactor imports for better organization across agent modules.
e4c7240
unverified
from smolagents import tool | |
from smolagents.default_tools import DuckDuckGoSearchTool | |
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 | |