Fix type hint for FileChunkingStrategyParam to use StaticFileChunkingStrategyObject#2014
Closed
prdai wants to merge 1 commit intoopenai:mainfrom
Closed
Fix type hint for FileChunkingStrategyParam to use StaticFileChunkingStrategyObject#2014prdai wants to merge 1 commit intoopenai:mainfrom
prdai wants to merge 1 commit intoopenai:mainfrom
Conversation
…StrategyObject Updated the type alias for FileChunkingStrategyParam to replace StaticFileChunkingStrategyParam with StaticFileChunkingStrategyObject to align with the correct API structure and resolve type errors.
1 task
Collaborator
|
Thanks for the PR, we fixed this separately and it'll be included in the next release #2013 |
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.
This PR addresses and resolves the issue referenced in GitHub Issue #2005. The current type hint for
FileChunkingStrategyParamcaused API errors when passing aStaticFileChunkingStrategyParam, resulting in a400error due to a missing parameter ('chunking_strategy.type').Summary of Changes:
StaticFileChunkingStrategyParamwithStaticFileChunkingStrategyObjectin the type alias forFileChunkingStrategyParam.'chunking_strategy.type'parameter.Issue Addressed (#2005):
400 - Missing required parameter: 'chunking_strategy.type') was caused by the incorrect type hint. UsingStaticFileChunkingStrategyObjectaligns with the expected API input and resolves the error.StaticFileChunkingStrategyParamwas passed directly, so this fix aligns the type hinting with the actual API expectations.Concerns & Future Exploration:
AutoFileChunkingStrategyParamlacks astaticfield, whichStaticFileChunkingStrategyObjectincludes. This inconsistency could lead to issues in the future if similar expectations arise forAutoFileChunkingStrategyParam. I plan to further explore this potential gap in the future.Checklist:
chunking_strategyparams onFileclass methods #2005).Thank you for considering this PR! Please feel free to share any feedback or suggestions, and I’ll be happy to address them. 😊