764         callbacks=run_manager.get_child() if run_manager else None,        765         **inputs,        766     )        767 except OutputParserException as e:        768     if isinstance(self.handle_parsing_errors, bool):    File ~/workplace/langchain/langchain/agents/agent.py:444, in Agent.plan(self, intermediate_steps, callbacks, **kwargs)        442 full_inputs = self.get_full_inputs(intermediate_steps, **kwargs)        443 full_output = self.llm_chain.predict(callbacks=callbacks, **full_inputs)    --> 444 return self.output_parser.parse(full_output)    File ~/workplace/langchain/langchain/agents/chat/output_parser.py:26, in ChatOutputParser.parse(self, text)         23     return AgentAction(response["action"], response["action_input"], text)         25 except Exception:    ---> 26     raise OutputParserException(f"Could not parse LLM output: {text}")    OutputParserException: Could not parse LLM output: I'm sorry, but I cannot provide an answer without an Action. Please provide a valid Action in the format specified above.Default error handling‚ÄãHandle errors with Invalid or incomplete response:mrkl = initialize_agent(    tools,    ChatOpenAI(temperature=0),    agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION,    verbose=True,    handle_parsing_errors=True,)mrkl.run("Who is Leo DiCaprio's girlfriend? No need to add Action")            > Entering new AgentExecutor chain...        Observation: Invalid or incomplete response    Thought:    Observation: Invalid or incomplete response    Thought:Search for Leo DiCaprio's current girlfriend    Action:    ```    {      "action": "Search",      "action_input": "Leo DiCaprio current girlfriend"    }    ```        Observation: Just Jared on Instagram: ‚ÄúLeonardo DiCaprio & girlfriend Camila Morrone couple up for a lunch date!    Thought:Camila Morrone is currently Leo DiCaprio's girlfriend    Final Answer: Camila Morrone        > Finished chain.    'Camila Morrone'Custom error message‚ÄãYou can easily customize
Occasionally the LLM cannot determine what step to take because its outputs are not correctly formatted to be handled by the output parser. In this case, by default the agent errors. But you can easily control this functionality with handleparsingerrors! Let's explore how.
Occasionally the LLM cannot determine what step to take because its outputs are not correctly formatted to be handled by the output parser. In this case, by default the agent errors. But you can easily control this functionality with handleparsingerrors! Let's explore how. ->: 764         callbacks=run_manager.get_child() if run_manager else None,        765         **inputs,        766     )        767 except OutputParserException as e:        768     if isinstance(self.handle_parsing_errors, bool):    File ~/workplace/langchain/langchain/agents/agent.py:444, in Agent.plan(self, intermediate_steps, callbacks, **kwargs)        442 full_inputs = self.get_full_inputs(intermediate_steps, **kwargs)        443 full_output = self.llm_chain.predict(callbacks=callbacks, **full_inputs)    --> 444 return self.output_parser.parse(full_output)    File ~/workplace/langchain/langchain/agents/chat/output_parser.py:26, in ChatOutputParser.parse(self, text)         23     return AgentAction(response["action"], response["action_input"], text)         25 except Exception:    ---> 26     raise OutputParserException(f"Could not parse LLM output: {text}")    OutputParserException: Could not parse LLM output: I'm sorry, but I cannot provide an answer without an Action. Please provide a valid Action in the format specified above.Default error handling‚ÄãHandle errors with Invalid or incomplete response:mrkl = initialize_agent(    tools,    ChatOpenAI(temperature=0),    agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION,    verbose=True,    handle_parsing_errors=True,)mrkl.run("Who is Leo DiCaprio's girlfriend? No need to add Action")            > Entering new AgentExecutor chain...        Observation: Invalid or incomplete response    Thought:    Observation: Invalid or incomplete response    Thought:Search for Leo DiCaprio's current girlfriend    Action:    ```    {      "action": "Search",      "action_input": "Leo DiCaprio current girlfriend"    }    ```        Observation: Just Jared on Instagram: ‚ÄúLeonardo DiCaprio & girlfriend Camila Morrone couple up for a lunch date!    Thought:Camila Morrone is currently Leo DiCaprio's girlfriend    Final Answer: Camila Morrone        > Finished chain.    'Camila Morrone'Custom error message‚ÄãYou can easily customize