name = "Calculator"    description = "useful for when you need to answer questions about math"    args_schema: Type[BaseModel] = CalculatorInput    def _run(        self, query: str, run_manager: Optional[CallbackManagerForToolRun] = None    ) -> str:        """Use the tool."""        return llm_math_chain.run(query)    async def _arun(        self, query: str, run_manager: Optional[AsyncCallbackManagerForToolRun] = None    ) -> str:        """Use the tool asynchronously."""        raise NotImplementedError("Calculator does not support async")tools = [CustomSearchTool(), CustomCalculatorTool()]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 use custom_search to find out who Leo DiCaprio's girlfriend is, and then use the Calculator to raise her age to the 0.43 power.    Action: custom_search    Action Input: "Leo DiCaprio girlfriend"    Observation: After rumours of a romance with Gigi Hadid, the Oscar winner has seemingly moved on. First being linked to the television personality in September 2022, it appears as if his "age bracket" has moved up. This follows his rumoured relationship with mere 19-year-old Eden Polani.    Thought:I need to find out the current age of Eden Polani.    Action: custom_search    Action Input: "Eden Polani age"    Observation: 19 years old    Thought:Now I can use the Calculator to raise her age to the 0.43 power.    Action: Calculator    Action Input: 19 ^ 0.43        > Entering new LLMMathChain chain...    19 ^ 0.43```text    19 ** 0.43    ```    ...numexpr.evaluate("19 ** 0.43")...        Answer: 3.547023357958959    > Finished chain.        Observation: Answer: 3.547023357958959    Thought:I now know the final answer.    Final Answer: 3.547023357958959        > Finished chain.    '3.547023357958959'Using the tool
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: ->: name = "Calculator"    description = "useful for when you need to answer questions about math"    args_schema: Type[BaseModel] = CalculatorInput    def _run(        self, query: str, run_manager: Optional[CallbackManagerForToolRun] = None    ) -> str:        """Use the tool."""        return llm_math_chain.run(query)    async def _arun(        self, query: str, run_manager: Optional[AsyncCallbackManagerForToolRun] = None    ) -> str:        """Use the tool asynchronously."""        raise NotImplementedError("Calculator does not support async")tools = [CustomSearchTool(), CustomCalculatorTool()]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 use custom_search to find out who Leo DiCaprio's girlfriend is, and then use the Calculator to raise her age to the 0.43 power.    Action: custom_search    Action Input: "Leo DiCaprio girlfriend"    Observation: After rumours of a romance with Gigi Hadid, the Oscar winner has seemingly moved on. First being linked to the television personality in September 2022, it appears as if his "age bracket" has moved up. This follows his rumoured relationship with mere 19-year-old Eden Polani.    Thought:I need to find out the current age of Eden Polani.    Action: custom_search    Action Input: "Eden Polani age"    Observation: 19 years old    Thought:Now I can use the Calculator to raise her age to the 0.43 power.    Action: Calculator    Action Input: 19 ^ 0.43        > Entering new LLMMathChain chain...    19 ^ 0.43```text    19 ** 0.43    ```    ...numexpr.evaluate("19 ** 0.43")...        Answer: 3.547023357958959    > Finished chain.        Observation: Answer: 3.547023357958959    Thought:I now know the final answer.    Final Answer: 3.547023357958959        > Finished chain.    '3.547023357958959'Using the tool