Skip to content

Commit 11a5ad9

Browse files
committed
enforce v1 to be required cc strategy arg
1 parent 3aedf8f commit 11a5ad9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unstructured/chunking/dispatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def chunk(elements: Iterable[Element], chunking_strategy: str, **kwargs: Any) ->
126126
# -- pick out and use only those supported by this chunker.
127127
chunking_kwargs = {k: v for k, v in kwargs.items() if k in chunker_spec.kw_arg_names}
128128
chunks = chunker_spec.chunker(elements, **chunking_kwargs)
129-
if contextual_chunking_strategy:
129+
if contextual_chunking_strategy == "v1":
130130
contextual_chunking_spec = _chunker_registry.get(contextual_chunking_strategy)
131131
if contextual_chunking_spec is None:
132132
raise ValueError(

0 commit comments

Comments
 (0)