mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 16:18:30 +00:00
fix: add type annotations to structured output converter
This commit is contained in:
@@ -22,10 +22,10 @@ from crewai.utilities import Logger
|
|||||||
from crewai.utilities.converter import Converter
|
from crewai.utilities.converter import Converter
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from langgraph.checkpoint.memory import (
|
from langgraph.checkpoint.memory import ( # type: ignore
|
||||||
MemorySaver, # type: ignore[import-not-found]
|
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
|
LANGGRAPH_AVAILABLE = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class LangGraphConverterAdapter(BaseConverterAdapter):
|
|||||||
"""Initialize the converter adapter with a reference to the agent adapter"""
|
"""Initialize the converter adapter with a reference to the agent adapter"""
|
||||||
self.agent_adapter = agent_adapter
|
self.agent_adapter = agent_adapter
|
||||||
self._output_format: str | None = None
|
self._output_format: str | None = None
|
||||||
self._schema = None
|
self._schema: str | None = None
|
||||||
self._system_prompt_appendix = None
|
self._system_prompt_appendix: str | None = None
|
||||||
|
|
||||||
def configure_structured_output(self, task: Any) -> None:
|
def configure_structured_output(self, task: Any) -> None:
|
||||||
"""Configure the structured output for LangGraph."""
|
"""Configure the structured output for LangGraph."""
|
||||||
|
|||||||
Reference in New Issue
Block a user