fix: Add support for 'basic' chunking strategy to match documentation#499
Open
Sameena-Thabassum wants to merge 2 commits intoUnstructured-IO:mainfrom
Open
fix: Add support for 'basic' chunking strategy to match documentation#499Sameena-Thabassum wants to merge 2 commits intoUnstructured-IO:mainfrom
Sameena-Thabassum wants to merge 2 commits intoUnstructured-IO:mainfrom
Conversation
Author
|
@dkarlovi Please review |
Contributor
|
Needs a version bump and a changelog update. Other than that looks good to me! |
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.
Problem Statement
The unstructured-api currently lacks support for the 'basic' chunking strategy, which is mentioned in the official documentation. As per the documentation, the API should allow users to choose between different chunking strategies, such as "by_title" and "basic". However, the chunking_strategy parameter in the API currently only supports 'by_title', causing a mismatch between the functionality described in the documentation and the actual behavior of the system.
Solution
Updating the chunking_strategy parameter: The chunking_strategy parameter is modified to support both 'by_title' and 'basic' chunking strategies, as indicated by the official documentation.
The Literal type hint for chunking_strategy is updated to include both 'by_title' and 'basic' as valid options.
This update ensures that the API accepts 'basic' as a valid chunking strategy and prevents potential issues with incorrect values.
Why this PR should be accepted
This pull request resolves a key issue by ensuring that the unstructured-api behaves consistently with the documented features, particularly by adding support for the 'basic' chunking strategy.