-
feat: add option for table chunking (#4354)
发布于
2026-05-22 23:01:24 +00:00 Summary
Adds
isolate_tables(defaultTrue) tochunk_elementsand
chunk_by_title, making the PR #4307 table-isolation behavior optional.True(default): preserves current behavior —Table/TableChunk
elements are always staged alone and never combined with neighbors by
PreChunkCombiner.False: restores the pre-#4307 behavior — tables can share pre-chunks
with adjacent text and be combined into aCompositeElement.
Rejects
skip_table_chunking=True+isolate_tables=Falsewith a
ValueError, since the pass-through path only fires when a table is
alone in its pre-chunk.
Summary by cubic
Adds
isolate_tablestochunk_elementsandchunk_by_titleto toggle
table isolation; defaultTruepreserves current behavior, while
Falselets tables share pre-chunks and merge with adjacent text into
CompositeElements. Validation now uses bool-coerced options and raises
ValueErrorwhenskip_table_chunking=Truewithisolate_tables=False
(including falsy values like0) for predictable behavior.Written for commit 1da0506ebee07437b97ef6abc5da7592dc82fdd3.
Summary will update on new commits. Review
in cubic
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
下载附件