The maximum number of results. If None, returns results only from the first response.
None
Source code in pydantic_ai_slim/pydantic_ai/common_tools/duckduckgo.py
626364656667686970717273
defduckduckgo_search_tool(duckduckgo_client:DDGS|None=None,max_results:int|None=None):"""Creates a DuckDuckGo search tool. Args: duckduckgo_client: The DuckDuckGo search client. max_results: The maximum number of results. If None, returns results only from the first response. """returnTool(DuckDuckGoSearchTool(client=duckduckgo_clientorDDGS(),max_results=max_results).__call__,name='duckduckgo_search',description='Searches DuckDuckGo for the given query and returns the results.',)
Source code in pydantic_ai_slim/pydantic_ai/common_tools/tavily.py
71727374757677787980818283
deftavily_search_tool(api_key:str):"""Creates a Tavily search tool. Args: api_key: The Tavily API key. You can get one by signing up at [https://app.tavily.com/home](https://app.tavily.com/home). """returnTool(TavilySearchTool(client=AsyncTavilyClient(api_key)).__call__,name='tavily_search',description='Searches Tavily for the given query and returns the results.',)