Repository navigation
fix: set FileContent filename from ByteStream meta in FileToFileContent - #13831
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
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.
Related Issues
Proposed Changes:
FileToFileContentonly setFileContent.filenamewhen the source was a path. ForByteStreamsources it was alwaysNone, soOpenAIResponsesChatGeneratorsent the placeholder"filename"to OpenAI.This shows up when files arrive as
ByteStreams from an upload API, which is how deepset AI Platform passes files into query pipelines (withmeta["file_name"]set and the bytes stored under a file ID path).For
ByteStreamsources the filename now comes frommeta["file_name"], or else from the base name ofmeta["file_path"](the keyget_bytestream_from_sourceand the other converters use).How did you test it?
Added a parametrized unit test covering
file_name,file_path, and both set. Rantest/components/converters/test_file_to_file_content.pylocally.Notes for the reviewer
file_nametakes precedence overfile_pathbecause an upload's stored path often has a generated name (e.g.<uuid>.pdf) rather than the original one.Checklist