Repository navigation
✨ pass text context to chained model - #287
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Parameter loading silently discards string-keyed extraction context and converts invalid false values to nil, bypassing constructor validation.
2 open issues
What changed in this PR
Adds text context support for extraction models chained to V2 classification, crop, and split utilities.
Changes:
- Introduces shared context validation and request serialization.
- Updates utility parameters and matching Ruby type signatures.
- Expands parameter tests and clarifies a code-conversion example.
| File | Description |
|---|---|
spec/v2/product/split/split_parameter_spec.rb |
Tests split parameters and context validation. |
spec/v2/product/ocr/ocr_parameter_spec.rb |
Adds OCR parameter tests. |
spec/v2/product/extraction/extraction_parameter_spec.rb |
Expands extraction parameter coverage. |
spec/v2/product/crop/crop_parameter_spec.rb |
Tests crop parameters and context validation. |
spec/v2/product/classification/classification_parameter_spec.rb |
Tests classification parameters and context validation. |
sig/mindee/v2/product/split/params/split_parameters.rbs |
Declares split context support. |
sig/mindee/v2/product/crop/params/crop_parameters.rbs |
Declares crop context support. |
sig/mindee/v2/product/classification/params/classification_parameters.rbs |
Declares classification context support. |
sig/mindee/v2/client_options/base_classifier_product_parameters.rbs |
Types the new shared parameter class. |
lib/mindee/v2/product/split/params/split_parameters.rb |
Accepts chained extraction context. |
lib/mindee/v2/product/crop/params/crop_parameters.rb |
Accepts chained extraction context. |
lib/mindee/v2/product/classification/params/classification_parameters.rb |
Accepts chained extraction context. |
lib/mindee/v2/client_options/base_classifier_product_parameters.rb |
Adds shared context handling. |
lib/mindee/v2/client_options.rb |
Loads the new parameter class. |
AGENTS.md |
Adds a C# naming-conversion example. |
Review effort: Balanced
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.

Description
Types of changes