diff --git a/src/crewai/agent.py b/src/crewai/agent.py index a0bed66d2..1deaa1582 100644 --- a/src/crewai/agent.py +++ b/src/crewai/agent.py @@ -255,7 +255,7 @@ class Agent(BaseModel): agent=RunnableAgent(runnable=inner_agent), **executor_args ) - def count_formatting_errors(self) -> None: + def increment_formatting_errors(self) -> None: """Count the formatting errors of the agent.""" self.formatting_errors += 1 diff --git a/src/crewai/agents/parser.py b/src/crewai/agents/parser.py index 0ec7172b0..ef2abe11e 100644 --- a/src/crewai/agents/parser.py +++ b/src/crewai/agents/parser.py @@ -42,7 +42,7 @@ class CrewAgentParser(ReActSingleInputOutputParser): if includes_tool: if includes_answer: - self.agent.count_formatting_errors() + self.agent.increment_formatting_errors() raise OutputParserException(f"{FINAL_ANSWER_AND_TOOL_ERROR_MESSAGE}") return AgentAction("", "", text) @@ -54,7 +54,7 @@ class CrewAgentParser(ReActSingleInputOutputParser): format = self._i18n.slice("format_without_tools") error = f"{format}" - self.agent.count_formatting_errors() + self.agent.increment_formatting_errors() raise OutputParserException( error, observation=error,