Expose include_orig_elements param in partition API#576
Open
tylorbayer wants to merge 2 commits into
Open
Conversation
Add include_orig_elements as a form parameter (default True) so callers can omit orig_elements blobs from chunk metadata and reduce response size for large documents with tables. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Closing — resubmitting from branch on upstream repo. |
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
No issues found across 4 files
Shadow auto-approve: would auto-approve. Adds include_orig_elements parameter to partition API, defaulting to True, to optionally omit orig_elements blobs from chunk metadata (reducing payload size). Includes version bump and CHANGELOG update. Backward-compatible, low-risk additive change.
Re-trigger cubic
Author
|
@awalker4 what is the process for getting this merged in? |
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.
Summary
include_orig_elementsas a new form parameter (defaultTrue) to control whether original elements are included in chunk metadataTrue, elements used to form each chunk are attached to that chunk's.metadata.orig_elementsas a gzipped+base64 blobFalse, these blobs are omitted from the response, significantly reducing payload size for large documents (especially those with large tables where the blob is duplicated into every chunk)GeneralFormParams,pipeline_api, and all relevant chunking call sitesChangelog
Added a
0.1.8entry under### FeaturesinCHANGELOG.md.Test plan
include_orig_elements=falseand verify response chunks do not containorig_elementsin metadatainclude_orig_elements=true(or omit the parameter) and confirmorig_elementsis present in chunk metadata as expectedMade with Cursor