mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-23 15:18:14 +00:00
feat: export file types and deprecate agent multimodal flag
- Export File type classes from crewai package - Mark Agent.multimodal field as deprecated (use input_files instead)
This commit is contained in:
@@ -15,6 +15,14 @@ from crewai.task import Task
|
||||
from crewai.tasks.llm_guardrail import LLMGuardrail
|
||||
from crewai.tasks.task_output import TaskOutput
|
||||
from crewai.telemetry.telemetry import Telemetry
|
||||
from crewai.utilities.files import (
|
||||
AudioFile,
|
||||
File,
|
||||
ImageFile,
|
||||
PDFFile,
|
||||
TextFile,
|
||||
VideoFile,
|
||||
)
|
||||
|
||||
|
||||
def _suppress_pydantic_deprecation_warnings() -> None:
|
||||
@@ -74,14 +82,20 @@ _track_install_async()
|
||||
__all__ = [
|
||||
"LLM",
|
||||
"Agent",
|
||||
"AudioFile",
|
||||
"BaseLLM",
|
||||
"Crew",
|
||||
"CrewOutput",
|
||||
"File",
|
||||
"Flow",
|
||||
"ImageFile",
|
||||
"Knowledge",
|
||||
"LLMGuardrail",
|
||||
"PDFFile",
|
||||
"Process",
|
||||
"Task",
|
||||
"TaskOutput",
|
||||
"TextFile",
|
||||
"VideoFile",
|
||||
"__version__",
|
||||
]
|
||||
|
||||
@@ -88,9 +88,9 @@ from crewai.utilities.training_handler import CrewTrainingHandler
|
||||
try:
|
||||
from crewai.a2a.config import A2AClientConfig, A2AConfig, A2AServerConfig
|
||||
except ImportError:
|
||||
A2AClientConfig = Any
|
||||
A2AConfig = Any
|
||||
A2AServerConfig = Any
|
||||
A2AClientConfig = Any # type: ignore[assignment,misc]
|
||||
A2AConfig = Any # type: ignore[assignment,misc]
|
||||
A2AServerConfig = Any # type: ignore[assignment,misc]
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -184,7 +184,8 @@ class Agent(BaseAgent):
|
||||
)
|
||||
multimodal: bool = Field(
|
||||
default=False,
|
||||
description="Whether the agent is multimodal.",
|
||||
deprecated=True,
|
||||
description="[DEPRECATED, will be removed in v2.0 - pass files natively.] Whether the agent is multimodal.",
|
||||
)
|
||||
inject_date: bool = Field(
|
||||
default=False,
|
||||
|
||||
Reference in New Issue
Block a user