From 25204c6cb88f845ed9f2270ec4db56eb09d8b1ad Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Thu, 4 Sep 2025 22:53:32 -0400 Subject: [PATCH] fix: add type annotations to structured output converter --- .../agents/agent_adapters/langgraph/langgraph_adapter.py | 6 +++--- .../agent_adapters/langgraph/structured_output_converter.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crewai/agents/agent_adapters/langgraph/langgraph_adapter.py b/src/crewai/agents/agent_adapters/langgraph/langgraph_adapter.py index c3b77c925..d73206330 100644 --- a/src/crewai/agents/agent_adapters/langgraph/langgraph_adapter.py +++ b/src/crewai/agents/agent_adapters/langgraph/langgraph_adapter.py @@ -22,10 +22,10 @@ from crewai.utilities import Logger from crewai.utilities.converter import Converter try: - from langgraph.checkpoint.memory import ( - MemorySaver, # type: ignore[import-not-found] + from langgraph.checkpoint.memory import ( # type: ignore + MemorySaver, ) - from langgraph.prebuilt import create_react_agent # type: ignore[import-not-found] + from langgraph.prebuilt import create_react_agent # type: ignore LANGGRAPH_AVAILABLE = True except ImportError: diff --git a/src/crewai/agents/agent_adapters/langgraph/structured_output_converter.py b/src/crewai/agents/agent_adapters/langgraph/structured_output_converter.py index 715f80d70..322c4317d 100644 --- a/src/crewai/agents/agent_adapters/langgraph/structured_output_converter.py +++ b/src/crewai/agents/agent_adapters/langgraph/structured_output_converter.py @@ -12,8 +12,8 @@ class LangGraphConverterAdapter(BaseConverterAdapter): """Initialize the converter adapter with a reference to the agent adapter""" self.agent_adapter = agent_adapter self._output_format: str | None = None - self._schema = None - self._system_prompt_appendix = None + self._schema: str | None = None + self._system_prompt_appendix: str | None = None def configure_structured_output(self, task: Any) -> None: """Configure the structured output for LangGraph."""