mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-25 08:08:14 +00:00
- add input_files parameter to Crew.kickoff(), Flow.kickoff(), Task, and Agent.kickoff() - add provider-specific file uploaders for OpenAI, Anthropic, Gemini, and Bedrock - add file type detection, constraint validation, and automatic format conversion - add URL file source support for multimodal content - add streaming uploads for large files - add prompt caching support for Anthropic - add OpenAI Responses API support
69 lines
1.7 KiB
Python
69 lines
1.7 KiB
Python
"""File processing module for multimodal content handling.
|
|
|
|
This module provides validation, transformation, and processing utilities
|
|
for files used in multimodal LLM interactions.
|
|
"""
|
|
|
|
from crewai_files.processing.constraints import (
|
|
ANTHROPIC_CONSTRAINTS,
|
|
BEDROCK_CONSTRAINTS,
|
|
GEMINI_CONSTRAINTS,
|
|
OPENAI_COMPLETIONS_CONSTRAINTS,
|
|
OPENAI_CONSTRAINTS,
|
|
OPENAI_RESPONSES_CONSTRAINTS,
|
|
AudioConstraints,
|
|
ImageConstraints,
|
|
PDFConstraints,
|
|
ProviderConstraints,
|
|
VideoConstraints,
|
|
get_constraints_for_provider,
|
|
get_supported_content_types,
|
|
)
|
|
from crewai_files.processing.enums import FileHandling
|
|
from crewai_files.processing.exceptions import (
|
|
FileProcessingError,
|
|
FileTooLargeError,
|
|
FileValidationError,
|
|
ProcessingDependencyError,
|
|
UnsupportedFileTypeError,
|
|
)
|
|
from crewai_files.processing.processor import FileProcessor
|
|
from crewai_files.processing.validators import (
|
|
validate_audio,
|
|
validate_file,
|
|
validate_image,
|
|
validate_pdf,
|
|
validate_text,
|
|
validate_video,
|
|
)
|
|
|
|
|
|
__all__ = [
|
|
"ANTHROPIC_CONSTRAINTS",
|
|
"BEDROCK_CONSTRAINTS",
|
|
"GEMINI_CONSTRAINTS",
|
|
"OPENAI_COMPLETIONS_CONSTRAINTS",
|
|
"OPENAI_CONSTRAINTS",
|
|
"OPENAI_RESPONSES_CONSTRAINTS",
|
|
"AudioConstraints",
|
|
"FileHandling",
|
|
"FileProcessingError",
|
|
"FileProcessor",
|
|
"FileTooLargeError",
|
|
"FileValidationError",
|
|
"ImageConstraints",
|
|
"PDFConstraints",
|
|
"ProcessingDependencyError",
|
|
"ProviderConstraints",
|
|
"UnsupportedFileTypeError",
|
|
"VideoConstraints",
|
|
"get_constraints_for_provider",
|
|
"get_supported_content_types",
|
|
"validate_audio",
|
|
"validate_file",
|
|
"validate_image",
|
|
"validate_pdf",
|
|
"validate_text",
|
|
"validate_video",
|
|
]
|