mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-24 23:58:15 +00:00
docs: add README and description for crewai-files package
This commit is contained in:
@@ -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")],
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "crewai-files"
|
name = "crewai-files"
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
description = "Add your description here"
|
description = "File handling utilities for CrewAI multimodal inputs"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
authors = [
|
||||||
{ name = "Greyson LaLonde", email = "greyson@crewai.com" }
|
{ name = "Greyson LaLonde", email = "greyson@crewai.com" }
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
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
|
from typing_extensions import NotRequired, Unpack
|
||||||
|
|
||||||
@@ -36,9 +36,6 @@ ProviderType: TypeAlias = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
from typing import Any as AnyType
|
|
||||||
|
|
||||||
|
|
||||||
class _BaseOpts(TypedDict):
|
class _BaseOpts(TypedDict):
|
||||||
"""Kwargs for uploader factory."""
|
"""Kwargs for uploader factory."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user