AiNewsV2 / tools /search.py
Phoenix21's picture
Modular code
7516245
raw
history blame contribute delete
389 Bytes
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)