nat.plugins.agno.tools.serp_api_tool#
Attributes#
Classes#
Tool that retrieves search results from the web using SerpAPI. |
Functions#
|
Create a SerpAPI search tool for use with Agno. |
Module Contents#
- logger#
- class SerpApiToolConfig(/, **data: Any)#
Bases:
nat.data_models.function.FunctionBaseConfigTool that retrieves search results from the web using SerpAPI. Requires a SERP_API_KEY.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- async serp_api_tool(
- tool_config: SerpApiToolConfig,
- builder: nat.builder.builder.Builder,
Create a SerpAPI search tool for use with Agno.
This creates a search function that uses SerpAPI to search the web.
- Args:
tool_config (SerpApiToolConfig): Configuration for the SerpAPI tool. builder (Builder): The NAT builder instance.
- Returns:
FunctionInfo: A FunctionInfo object wrapping the SerpAPI search functionality.