From 8c90db04b5439bed4682b8575fe28db37deb7898 Mon Sep 17 00:00:00 2001 From: fuckqqcom <9391575+fuckqqcom@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:37:54 +0800 Subject: [PATCH] =?UTF-8?q?=5Fexecute=5Ftool=5Fand=5Fcheck=5Ffinality=20?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E7=BB=99=E5=9B=9E=E8=B0=83=E5=8F=82=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E6=A0=B7=E5=B0=B1=E5=8F=AF=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E5=89=8D=E6=8B=BF=E5=88=B0=E7=BB=93=E6=9E=9C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E5=81=9A=E6=95=B0=E6=8D=AE=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=81=9A=E9=A2=84=E5=88=A4=20(#1716)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: xiaohan Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> --- src/crewai/agents/crew_agent_executor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/crewai/agents/crew_agent_executor.py b/src/crewai/agents/crew_agent_executor.py index 649360e30..83ca06e41 100644 --- a/src/crewai/agents/crew_agent_executor.py +++ b/src/crewai/agents/crew_agent_executor.py @@ -143,6 +143,9 @@ class CrewAgentExecutor(CrewAgentExecutorMixin): tool_result = self._execute_tool_and_check_finality( formatted_answer ) + if self.step_callback: + self.step_callback(tool_result) + formatted_answer.text += f"\nObservation: {tool_result.result}" formatted_answer.result = tool_result.result if tool_result.result_as_answer: