From a95cf09ea53c7c5a2a769b62a513e8cac4de3b6e Mon Sep 17 00:00:00 2001 From: Deepak S V <42609308+svdeepak99@users.noreply.github.com> Date: Fri, 26 May 2023 22:15:38 -0700 Subject: [PATCH] Fixing blank thoughts in verbose for "_Exception" Action --- langchain/agents/agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/langchain/agents/agent.py b/langchain/agents/agent.py index 200868f25480c..c02412776ddc3 100644 --- a/langchain/agents/agent.py +++ b/langchain/agents/agent.py @@ -785,6 +785,8 @@ def _take_next_step( else: raise ValueError("Got unexpected type of `handle_parsing_errors`") output = AgentAction("_Exception", observation, text) + if run_manager: + run_manager.on_agent_action(output, color="green") tool_run_kwargs = self.agent.tool_run_logging_kwargs() observation = ExceptionTool().run( output.tool_input,