mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-24 15:48:23 +00:00
- Add VCR patch for binary request bodies (base64 encoding fallback) - Add generate_filename() utility for UUID-based filenames with extension - Add OpenAIResponsesFormatter for Responses API (input_image, input_file) - Fix OpenAI uploader to use 'vision' purpose for images - Fix Anthropic uploader to use tuple format (filename, content, content_type) - Add TextConstraints and text support for Gemini - Add file_id upload integration tests for Anthropic and OpenAI Responses API
crewai-files
File handling utilities for CrewAI multimodal inputs.
Supported File Types
ImageFile- PNG, JPEG, GIF, WebPPDFFile- PDF documentsTextFile- Plain text filesAudioFile- MP3, WAV, FLAC, OGG, M4AVideoFile- MP4, WebM, MOV, AVI
Usage
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
crew.kickoff(inputs={
"files": {"chart": ImageFile(source="chart.png")}
})
Passing Files to Tasks
task = Task(
description="Analyze the chart",
expected_output="Analysis",
agent=agent,
input_files=[ImageFile(source="chart.png")],
)