mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
Merge pull request #125 from crewAIInc/feat/remove-langchain
feat: remove langchain from code and update Dockerfile from CodeInterpreter
This commit is contained in:
@@ -1,11 +1,10 @@
|
|||||||
from abc import ABC, abstractmethod
|
from typing import Any, Callable
|
||||||
from typing import Any, Callable, Optional, Type
|
|
||||||
|
|
||||||
from langchain_core.tools import StructuredTool
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, validator
|
|
||||||
from pydantic import BaseModel as PydanticBaseModel
|
from pydantic import BaseModel as PydanticBaseModel
|
||||||
|
|
||||||
from crewai.tools.base_tool import BaseTool
|
from crewai.tools.base_tool import BaseTool
|
||||||
|
from crewai.tools.structured_tool import CrewStructuredTool
|
||||||
|
|
||||||
|
|
||||||
class Tool(BaseTool):
|
class Tool(BaseTool):
|
||||||
func: Callable
|
func: Callable
|
||||||
@@ -16,9 +15,9 @@ class Tool(BaseTool):
|
|||||||
|
|
||||||
|
|
||||||
def to_langchain(
|
def to_langchain(
|
||||||
tools: list[BaseTool | StructuredTool],
|
tools: list[BaseTool | CrewStructuredTool],
|
||||||
) -> list[StructuredTool]:
|
) -> list[CrewStructuredTool]:
|
||||||
return [t.to_langchain() if isinstance(t, BaseTool) else t for t in tools]
|
return [t.to_structured_tool() if isinstance(t, BaseTool) else t for t in tools]
|
||||||
|
|
||||||
|
|
||||||
def tool(*args):
|
def tool(*args):
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.12-alpine
|
||||||
|
|
||||||
# Install common utilities
|
RUN pip install requests beautifulsoup4
|
||||||
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/*
|
|
||||||
|
|
||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|||||||
Reference in New Issue
Block a user