tool_names = [tool.name for tool in tools]
agent = ZeroShotAgent(llm_chain=llm_chain, allowed_tools=tool_names)
agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=True)
agent_executor.run("How many people live in canada as of 2023?")
> Entering new AgentExecutor chain...
Arrr, ye be in luck, matey! I'll find ye the answer to yer question.
Thought: I need to search for the current population of Canada.
Action: Search
Action Input: "current population of Canada 2023"
Observation: The current population of Canada is 38,623,091 as of Saturday, March 4, 2023, based on Worldometer elaboration of the latest United Nations data.
Thought:Ahoy, me hearties! I've found the answer to yer question.
Final Answer: As of March 4, 2023, the population of Canada be 38,623,091. Arrr!
> Finished chain.
'As of March 4, 2023, the population of Canada be 38,623,091. Arrr!'
previous
How-To Guides
next
Chat Vector DB
By Harrison Chase
    
      © Copyright 2023, Harrison Chase.
      
  Last updated on Mar 22, 2023.