From b37fc94936652d49178957f0f8ed33a1cf0bf25d Mon Sep 17 00:00:00 2001 From: Lorenze Jay Date: Mon, 24 Feb 2025 11:44:38 -0800 Subject: [PATCH] refactor: Update LLM event response type to support Any --- src/crewai/llm.py | 2 +- src/crewai/utilities/events/llm_events.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crewai/llm.py b/src/crewai/llm.py index 84d3bfe5b..3607fa831 100644 --- a/src/crewai/llm.py +++ b/src/crewai/llm.py @@ -401,7 +401,7 @@ class LLM: logging.error(f"LiteLLM call failed: {str(e)}") raise - def _handle_emit_call_events(self, response: str, call_type: LLMCallType): + def _handle_emit_call_events(self, response: Any, call_type: LLMCallType): """Handle the events for the LLM call. Args: diff --git a/src/crewai/utilities/events/llm_events.py b/src/crewai/utilities/events/llm_events.py index ade8a84f4..751769fda 100644 --- a/src/crewai/utilities/events/llm_events.py +++ b/src/crewai/utilities/events/llm_events.py @@ -25,7 +25,7 @@ class LLMCallCompletedEvent(CrewEvent): """Event emitted when a task completes""" type: str = "llm_call_completed" - response: str + response: Any call_type: LLMCallType