mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
fix: Complete hosted tools implementation with remaining changes
- Finalize base_agent.py and agent_utils.py updates - Include comprehensive test suite for hosted tools - Update lock file with dependencies Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -25,7 +25,6 @@ from crewai.security.security_config import SecurityConfig
|
||||
from crewai.tools.base_tool import BaseTool, Tool
|
||||
from crewai.utilities import I18N, Logger, RPMController
|
||||
from crewai.utilities.config import process_config
|
||||
from crewai.utilities.converter import Converter
|
||||
from crewai.utilities.string_utils import interpolate_only
|
||||
|
||||
T = TypeVar("T", bound="BaseAgent")
|
||||
@@ -178,7 +177,7 @@ class BaseAgent(ABC, BaseModel):
|
||||
if not tools:
|
||||
return []
|
||||
|
||||
processed_tools = []
|
||||
processed_tools: List[Union[BaseTool, dict]] = []
|
||||
required_attrs = ["name", "func", "description"]
|
||||
for tool in tools:
|
||||
if isinstance(tool, BaseTool):
|
||||
|
||||
@@ -11,7 +11,6 @@ from crewai.agents.parser import (
|
||||
)
|
||||
from crewai.llm import LLM
|
||||
from crewai.llms.base_llm import BaseLLM
|
||||
from crewai.tools import BaseTool as CrewAITool
|
||||
from crewai.tools.base_tool import BaseTool
|
||||
from crewai.tools.structured_tool import CrewStructuredTool
|
||||
from crewai.tools.tool_types import ToolResult
|
||||
@@ -27,7 +26,7 @@ console = Console()
|
||||
|
||||
def parse_tools(tools: List[Union[BaseTool, dict]]) -> List[Union[CrewStructuredTool, dict]]:
|
||||
"""Parse tools to be used for the task."""
|
||||
tools_list = []
|
||||
tools_list: List[Union[CrewStructuredTool, dict]] = []
|
||||
|
||||
for tool in tools:
|
||||
if isinstance(tool, dict):
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai import Agent
|
||||
from crewai.tools import BaseTool
|
||||
from crewai.llm import LLM
|
||||
|
||||
|
||||
class MockTool(BaseTool):
|
||||
|
||||
Reference in New Issue
Block a user