diff --git a/src/crewai_tools/tools/base_tool.py b/src/crewai_tools/tools/base_tool.py index 60c477c41..674e33030 100644 --- a/src/crewai_tools/tools/base_tool.py +++ b/src/crewai_tools/tools/base_tool.py @@ -1,11 +1,10 @@ -from abc import ABC, abstractmethod -from typing import Any, Callable, Optional, Type +from typing import Any, Callable -from langchain_core.tools import StructuredTool -from pydantic import BaseModel, ConfigDict, Field, validator from pydantic import BaseModel as PydanticBaseModel from crewai.tools.base_tool import BaseTool +from crewai.tools.structured_tool import CrewStructuredTool + class Tool(BaseTool): func: Callable @@ -16,9 +15,9 @@ class Tool(BaseTool): def to_langchain( - tools: list[BaseTool | StructuredTool], -) -> list[StructuredTool]: - return [t.to_langchain() if isinstance(t, BaseTool) else t for t in tools] + tools: list[BaseTool | CrewStructuredTool], +) -> list[CrewStructuredTool]: + return [t.to_structured_tool() if isinstance(t, BaseTool) else t for t in tools] def tool(*args): diff --git a/src/crewai_tools/tools/code_interpreter_tool/Dockerfile b/src/crewai_tools/tools/code_interpreter_tool/Dockerfile index ae9b2ffd6..4df22ca58 100644 --- a/src/crewai_tools/tools/code_interpreter_tool/Dockerfile +++ b/src/crewai_tools/tools/code_interpreter_tool/Dockerfile @@ -1,14 +1,6 @@ -FROM python:3.11-slim +FROM python:3.12-alpine -# Install common utilities -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - wget \ - software-properties-common - -# Clean up -RUN apt-get clean && rm -rf /var/lib/apt/lists/* +RUN pip install requests beautifulsoup4 # Set the working directory WORKDIR /workspace