From 8be27da9ffc396fa60899a786a30024a5ef2cb4d Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Thu, 22 Jan 2026 22:50:10 -0500 Subject: [PATCH] docs: add README and description for crewai-files package --- lib/crewai-files/README.md | 43 +++++++++++++++++++ lib/crewai-files/pyproject.toml | 2 +- .../src/crewai_files/uploaders/factory.py | 5 +-- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/lib/crewai-files/README.md b/lib/crewai-files/README.md index e69de29bb..7d642fcca 100644 --- a/lib/crewai-files/README.md +++ b/lib/crewai-files/README.md @@ -0,0 +1,43 @@ +# crewai-files + +File handling utilities for CrewAI multimodal inputs. + +## Supported File Types + +- `ImageFile` - PNG, JPEG, GIF, WebP +- `PDFFile` - PDF documents +- `TextFile` - Plain text files +- `AudioFile` - MP3, WAV, FLAC, OGG, M4A +- `VideoFile` - MP4, WebM, MOV, AVI + +## Usage + +```python +from crewai_files import File, ImageFile, PDFFile + +# Auto-detect file type +file = File(source="document.pdf") # Resolves to PDFFile + +# Or use specific types +image = ImageFile(source="chart.png") +pdf = PDFFile(source="report.pdf") +``` + +### Passing Files to Crews + +```python +crew.kickoff(inputs={ + "files": {"chart": ImageFile(source="chart.png")} +}) +``` + +### Passing Files to Tasks + +```python +task = Task( + description="Analyze the chart", + expected_output="Analysis", + agent=agent, + input_files=[ImageFile(source="chart.png")], +) +``` diff --git a/lib/crewai-files/pyproject.toml b/lib/crewai-files/pyproject.toml index 5b04b3992..c53a1c1ff 100644 --- a/lib/crewai-files/pyproject.toml +++ b/lib/crewai-files/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "crewai-files" dynamic = ["version"] -description = "Add your description here" +description = "File handling utilities for CrewAI multimodal inputs" readme = "README.md" authors = [ { name = "Greyson LaLonde", email = "greyson@crewai.com" } diff --git a/lib/crewai-files/src/crewai_files/uploaders/factory.py b/lib/crewai-files/src/crewai_files/uploaders/factory.py index 455623f9e..3c79ce5cf 100644 --- a/lib/crewai-files/src/crewai_files/uploaders/factory.py +++ b/lib/crewai-files/src/crewai_files/uploaders/factory.py @@ -3,7 +3,7 @@ from __future__ import annotations import logging -from typing import Literal, TypeAlias, TypedDict, overload +from typing import Any as AnyType, Literal, TypeAlias, TypedDict, overload from typing_extensions import NotRequired, Unpack @@ -36,9 +36,6 @@ ProviderType: TypeAlias = ( ) -from typing import Any as AnyType - - class _BaseOpts(TypedDict): """Kwargs for uploader factory."""