return AgentAction(            tool=action, tool_input=action_input.strip(" ").strip('"'), log=llm_output        )output_parser = CustomOutputParser()Set up LLM, stop sequence, and the agent‚ÄãAlso the same as the previous notebook.llm = OpenAI(temperature=0)# LLM chain consisting of the LLM and a promptllm_chain = LLMChain(llm=llm, prompt=prompt)tools = get_tools("whats the weather?")tool_names = [tool.name for tool in tools]agent = LLMSingleActionAgent(    llm_chain=llm_chain,    output_parser=output_parser,    stop=["\nObservation:"],    allowed_tools=tool_names,)Use the Agent‚ÄãNow we can use it!agent_executor = AgentExecutor.from_agent_and_tools(    agent=agent, tools=tools, verbose=True)agent_executor.run("What's the weather in SF?")            > Entering new AgentExecutor chain...    Thought: I need to find out what the weather is in SF    Action: Search    Action Input: Weather in SF        Observation:Mostly cloudy skies early, then partly cloudy in the afternoon. High near 60F. ENE winds shifting to W at 10 to 15 mph. Humidity71%. UV Index6 of 10. I now know the final answer    Final Answer: 'Arg, 'tis mostly cloudy skies early, then partly cloudy in the afternoon. High near 60F. ENE winds shiftin' to W at 10 to 15 mph. Humidity71%. UV Index6 of 10.        > Finished chain.    "'Arg, 'tis mostly cloudy skies early, then partly cloudy in the afternoon. High near 60F. ENE winds shiftin' to W at 10 to 15 mph. Humidity71%. UV Index6 of 10."PreviousCustom agentNextCustom LLM agentSet up environmentSet up toolsTool RetrieverPrompt templateOutput parserSet up LLM, stop sequence, and the agentUse the AgentCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This notebook builds off of this notebook and assumes familiarity with how agents work.
This notebook builds off of this notebook and assumes familiarity with how agents work. ->: return AgentAction(            tool=action, tool_input=action_input.strip(" ").strip('"'), log=llm_output        )output_parser = CustomOutputParser()Set up LLM, stop sequence, and the agent‚ÄãAlso the same as the previous notebook.llm = OpenAI(temperature=0)# LLM chain consisting of the LLM and a promptllm_chain = LLMChain(llm=llm, prompt=prompt)tools = get_tools("whats the weather?")tool_names = [tool.name for tool in tools]agent = LLMSingleActionAgent(    llm_chain=llm_chain,    output_parser=output_parser,    stop=["\nObservation:"],    allowed_tools=tool_names,)Use the Agent‚ÄãNow we can use it!agent_executor = AgentExecutor.from_agent_and_tools(    agent=agent, tools=tools, verbose=True)agent_executor.run("What's the weather in SF?")            > Entering new AgentExecutor chain...    Thought: I need to find out what the weather is in SF    Action: Search    Action Input: Weather in SF        Observation:Mostly cloudy skies early, then partly cloudy in the afternoon. High near 60F. ENE winds shifting to W at 10 to 15 mph. Humidity71%. UV Index6 of 10. I now know the final answer    Final Answer: 'Arg, 'tis mostly cloudy skies early, then partly cloudy in the afternoon. High near 60F. ENE winds shiftin' to W at 10 to 15 mph. Humidity71%. UV Index6 of 10.        > Finished chain.    "'Arg, 'tis mostly cloudy skies early, then partly cloudy in the afternoon. High near 60F. ENE winds shiftin' to W at 10 to 15 mph. Humidity71%. UV Index6 of 10."PreviousCustom agentNextCustom LLM agentSet up environmentSet up toolsTool RetrieverPrompt templateOutput parserSet up LLM, stop sequence, and the agentUse the AgentCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.