mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-27 00:58:13 +00:00
feat: Remove not needed event
This commit is contained in:
@@ -707,15 +707,6 @@ class LLM(BaseLLM):
|
|||||||
function_name, lambda: None
|
function_name, lambda: None
|
||||||
) # Ensure fn is always a callable
|
) # Ensure fn is always a callable
|
||||||
logging.error(f"Error executing function '{function_name}': {e}")
|
logging.error(f"Error executing function '{function_name}': {e}")
|
||||||
crewai_event_bus.emit(
|
|
||||||
self,
|
|
||||||
event=ToolExecutionErrorEvent(
|
|
||||||
tool_name=function_name,
|
|
||||||
tool_args=function_args,
|
|
||||||
tool_class=fn,
|
|
||||||
error=str(e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
crewai_event_bus.emit(
|
crewai_event_bus.emit(
|
||||||
self,
|
self,
|
||||||
event=LLMCallFailedEvent(error=f"Tool execution error: {str(e)}"),
|
event=LLMCallFailedEvent(error=f"Tool execution error: {str(e)}"),
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class ToolUsage:
|
|||||||
tool_string: str,
|
tool_string: str,
|
||||||
tool: CrewStructuredTool,
|
tool: CrewStructuredTool,
|
||||||
calling: Union[ToolCalling, InstructorToolCalling],
|
calling: Union[ToolCalling, InstructorToolCalling],
|
||||||
) -> str:
|
) -> str:
|
||||||
if self._check_tool_repeated_usage(calling=calling): # type: ignore # _check_tool_repeated_usage of "ToolUsage" does not return a value (it only ever returns None)
|
if self._check_tool_repeated_usage(calling=calling): # type: ignore # _check_tool_repeated_usage of "ToolUsage" does not return a value (it only ever returns None)
|
||||||
try:
|
try:
|
||||||
result = self._i18n.errors("task_repeated_usage").format(
|
result = self._i18n.errors("task_repeated_usage").format(
|
||||||
|
|||||||
Reference in New Issue
Block a user