diff --git a/src/crewai/tools/tool_usage.py b/src/crewai/tools/tool_usage.py index 854e1309d..4b9e2bac0 100644 --- a/src/crewai/tools/tool_usage.py +++ b/src/crewai/tools/tool_usage.py @@ -119,10 +119,9 @@ class ToolUsage: self._printer.print(content=f"\n\n{error}\n", color="red") return error - if ( - isinstance(tool, CrewStructuredTool) - and tool.name == self._i18n.tools("add_image")["name"] - ): # type: ignore + if isinstance(tool, CrewStructuredTool) and tool.name == self._i18n.tools( + "add_image" + ).get("name"): # type: ignore try: result = self._use(tool_string=tool_string, tool=tool, calling=calling) return result diff --git a/src/crewai/utilities/events/__init__.py b/src/crewai/utilities/events/__init__.py index d326b8fd6..55ffa0760 100644 --- a/src/crewai/utilities/events/__init__.py +++ b/src/crewai/utilities/events/__init__.py @@ -21,29 +21,3 @@ from .tool_usage_events import ToolUsageFinishedEvent, ToolUsageErrorEvent # events from .event_listener import EventListener from .third_party.agentops_listener import agentops_listener - - -__all__ = [ - AgentExecutionStartedEvent, - AgentExecutionCompletedEvent, - AgentExecutionErrorEvent, - CrewKickoffStartedEvent, - CrewKickoffCompletedEvent, - CrewKickoffFailedEvent, - TaskStartedEvent, - TaskCompletedEvent, - TaskFailedEvent, - FlowStartedEvent, - FlowFinishedEvent, - MethodExecutionStartedEvent, - MethodExecutionFinishedEvent, - EventTypes, - event_bus, - ToolUsageFinishedEvent, - ToolUsageErrorEvent, - EventBus, - AgentExecutionErrorEvent, -] - - -