759 """
    760 try:
    761     # Call the LLM to see what to do.
--> 762     output = self.agent.plan(
    763         intermediate_steps,
    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
rtdocs_stable/api.python.langchain.com/en/stable/modules/agents/agent_executors/examples/handle_parsing_errors.html