mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
feat: remove langchain from code and change to CrewStructuredTool and update Dockerilf CodeInterpreter
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user