from langchain_community.tools.tavily_search import TavilySearchResults | |
def get_search_tool(max_results=10): | |
""" | |
Create and return a TavilySearchResults tool | |
Args: | |
max_results (int): Maximum number of search results to return | |
Returns: | |
TavilySearchResults: Configured search tool | |
""" | |
return TavilySearchResults(max_results=max_results) |