be a language code")class CustomSearchTool(BaseTool):    name = "custom_search"    description = "useful for when you need to answer questions about current events"    args_schema: Type[SearchSchema] = SearchSchema    def _run(        self,        query: str,        engine: str = "google",        gl: str = "us",        hl: str = "en",        run_manager: Optional[CallbackManagerForToolRun] = None,    ) -> str:        """Use the tool."""        search_wrapper = SerpAPIWrapper(params={"engine": engine, "gl": gl, "hl": hl})        return search_wrapper.run(query)    async def _arun(        self,        query: str,        engine: str = "google",        gl: str = "us",        hl: str = "en",        run_manager: Optional[AsyncCallbackManagerForToolRun] = None,    ) -> str:        """Use the tool asynchronously."""        raise NotImplementedError("custom_search does not support async")Using the decorator‚ÄãThe tool decorator creates a structured tool automatically if the signature has multiple arguments.import requestsfrom langchain.tools import tool@tooldef post_message(url: str, body: dict, parameters: Optional[dict] = None) -> str:    """Sends a POST request to the given url with the given body and parameters."""    result = requests.post(url, json=body, params=parameters)    return f"Status: {result.status_code} - {result.text}"Modify existing tools‚ÄãNow, we show how to load existing tools and modify them directly. In the example below, we do something really simple and change the Search tool to have the name Google Search.from langchain.agents import load_toolstools = load_tools(["serpapi", "llm-math"], llm=llm)tools[0].name = "Google Search"agent = initialize_agent(    tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)agent.run(    "Who is Leo DiCaprio's girlfriend? What is her current age raised to the 0.43 power?")            > Entering new AgentExecutor chain...    I need to find out Leo DiCaprio's girlfriend's name and her age.    Action:
When constructing your own agent, you will need to provide it with a list of Tools that it can use. Besides the actual function that is called, the Tool consists of several components:
When constructing your own agent, you will need to provide it with a list of Tools that it can use. Besides the actual function that is called, the Tool consists of several components: ->: be a language code")class CustomSearchTool(BaseTool):    name = "custom_search"    description = "useful for when you need to answer questions about current events"    args_schema: Type[SearchSchema] = SearchSchema    def _run(        self,        query: str,        engine: str = "google",        gl: str = "us",        hl: str = "en",        run_manager: Optional[CallbackManagerForToolRun] = None,    ) -> str:        """Use the tool."""        search_wrapper = SerpAPIWrapper(params={"engine": engine, "gl": gl, "hl": hl})        return search_wrapper.run(query)    async def _arun(        self,        query: str,        engine: str = "google",        gl: str = "us",        hl: str = "en",        run_manager: Optional[AsyncCallbackManagerForToolRun] = None,    ) -> str:        """Use the tool asynchronously."""        raise NotImplementedError("custom_search does not support async")Using the decorator‚ÄãThe tool decorator creates a structured tool automatically if the signature has multiple arguments.import requestsfrom langchain.tools import tool@tooldef post_message(url: str, body: dict, parameters: Optional[dict] = None) -> str:    """Sends a POST request to the given url with the given body and parameters."""    result = requests.post(url, json=body, params=parameters)    return f"Status: {result.status_code} - {result.text}"Modify existing tools‚ÄãNow, we show how to load existing tools and modify them directly. In the example below, we do something really simple and change the Search tool to have the name Google Search.from langchain.agents import load_toolstools = load_tools(["serpapi", "llm-math"], llm=llm)tools[0].name = "Google Search"agent = initialize_agent(    tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)agent.run(    "Who is Leo DiCaprio's girlfriend? What is her current age raised to the 0.43 power?")            > Entering new AgentExecutor chain...    I need to find out Leo DiCaprio's girlfriend's name and her age.    Action: