mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Fix type-checker issues in agent adapters and base_agent
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -125,6 +125,7 @@ class LangGraphAgentAdapter(BaseAgentAdapter):
|
|||||||
task: Any,
|
task: Any,
|
||||||
context: Optional[str] = None,
|
context: Optional[str] = None,
|
||||||
tools: Optional[List[BaseTool]] = None,
|
tools: Optional[List[BaseTool]] = None,
|
||||||
|
recursion_depth: int = 0,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Execute a task using the LangGraph workflow."""
|
"""Execute a task using the LangGraph workflow."""
|
||||||
self.create_agent_executor(tools)
|
self.create_agent_executor(tools)
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ class OpenAIAgentAdapter(BaseAgentAdapter):
|
|||||||
task: Any,
|
task: Any,
|
||||||
context: Optional[str] = None,
|
context: Optional[str] = None,
|
||||||
tools: Optional[List[BaseTool]] = None,
|
tools: Optional[List[BaseTool]] = None,
|
||||||
|
recursion_depth: int = 0,
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Execute a task using the OpenAI Assistant"""
|
"""Execute a task using the OpenAI Assistant"""
|
||||||
self._converter_adapter.configure_structured_output(task)
|
self._converter_adapter.configure_structured_output(task)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ from crewai.security.security_config import SecurityConfig
|
|||||||
from crewai.tools.base_tool import BaseTool, Tool
|
from crewai.tools.base_tool import BaseTool, Tool
|
||||||
from crewai.utilities import I18N, Logger, RPMController
|
from crewai.utilities import I18N, Logger, RPMController
|
||||||
from crewai.utilities.config import process_config
|
from crewai.utilities.config import process_config
|
||||||
from crewai.utilities.converter import Converter
|
# Removed unused import: from crewai.utilities.converter import Converter
|
||||||
from crewai.utilities.string_utils import interpolate_only
|
from crewai.utilities.string_utils import interpolate_only
|
||||||
|
|
||||||
T = TypeVar("T", bound="BaseAgent")
|
T = TypeVar("T", bound="BaseAgent")
|
||||||
|
|||||||
Reference in New Issue
Block a user