feat: Add LLMCallFailedEvent emission for tool execution errors

Enhance error handling by emitting a specific event when tool execution fails during LLM calls
This commit is contained in:
Lorenze Jay
2025-02-24 11:52:50 -08:00
parent cefc57e2a3
commit 81ad2ab655

View File

@@ -382,6 +382,12 @@ class LLM:
error=str(e),
),
)
crewai_event_bus.emit(
self,
event=LLMCallFailedEvent(
error=f"Tool execution error: {str(e)}"
),
)
return text_response
else: