docs: add file upload support documentation for flows#5136
Open
alex-clawd wants to merge 2 commits intomainfrom
Open
docs: add file upload support documentation for flows#5136alex-clawd wants to merge 2 commits intomainfrom
alex-clawd wants to merge 2 commits intomainfrom
Conversation
…with emit When a @human_feedback decorated method with emit= is the final method in a flow (no downstream listeners triggered), the flow's final output was incorrectly set to the collapsed outcome string (e.g., 'approved') instead of the method's actual return value (e.g., a state dict). Root cause: _process_feedback() returns the collapsed_outcome string when emit is set, and this string was being stored as the method's result in _method_outputs. The fix: 1. In human_feedback.py: After _process_feedback, stash the real method_output on the flow instance as _human_feedback_method_output when emit is set. 2. In flow.py: After appending a method result to _method_outputs, check if _human_feedback_method_output is set. If so, replace the last entry with the stashed real output and clear the stash. This ensures: - Routing still works correctly (collapsed outcome used for @listen matching) - The flow's final result is the actual method return value - If downstream listeners execute, their results become the final output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 'File Inputs' section to flows.mdx documenting: - Using crewai-files types (ImageFile, PDFFile, etc.) in flow state - CrewAI Platform (AMP) automatic file upload dropzone rendering - API usage with URL string coercion via Pydantic - Update files.mdx with: - Example of file types in flow state - Note about CrewAI Platform integration for flows Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of File Upload Support — Docs
Documents how to use
crewai-filestypes (ImageFile,PDFFile, etc.) in flow state for file upload support.Changes
docs/en/concepts/flows.mdx— new 'File Inputs' section with examplesdocs/en/concepts/files.mdx— enhanced 'With Flows' section with Platform integration notesWhat users learn
Part of
File upload feature — Enterprise PR #1035 → AMP PR #2584 → This docs PR