Skip to content

Commit

Permalink
enforce v1 to be required cc strategy arg
Browse files Browse the repository at this point in the history
  • Loading branch information
tbs17 committed Jan 16, 2025
1 parent 3aedf8f commit 11a5ad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unstructured/chunking/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def chunk(elements: Iterable[Element], chunking_strategy: str, **kwargs: Any) ->
# -- pick out and use only those supported by this chunker.
chunking_kwargs = {k: v for k, v in kwargs.items() if k in chunker_spec.kw_arg_names}
chunks = chunker_spec.chunker(elements, **chunking_kwargs)
if contextual_chunking_strategy:
if contextual_chunking_strategy == "v1":
contextual_chunking_spec = _chunker_registry.get(contextual_chunking_strategy)
if contextual_chunking_spec is None:
raise ValueError(
Expand Down

0 comments on commit 11a5ad9

Please sign in to comment.