-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Bug Description
The suppress_parse_errors parameter cannot be passed through resolver_params in the extract() method, even though it's already implemented in the Resolver.resolve() method.
Expected Behavior
Users should be able to control parsing error handling via:
langextract.extract(
text_or_documents="Some text",
prompt_description="Extract entities",
examples=[...],
resolver_params={"suppress_parse_errors": True} # Should work
)Actual Behavior
The above code fails to set the value of 'suppress_parse_errors' in Resolver
Root Cause
The suppress_parse_errors parameter is not included in ALIGNMENT_PARAM_KEYS in resolver.py, so it doesn't get properly extracted from resolver_params and routed to the resolve() method.
Impact
- Users cannot suppress parsing errors through the public API
- Forces users to handle parsing errors at a higher level
- Inconsistent with other resolver parameters like
enable_fuzzy_alignment
Proposed Solution
Add "suppress_parse_errors" to ALIGNMENT_PARAM_KEYS in resolver.py to enable proper parameter routing.
Environment
- LangExtract version: Latest main branch
- Python version: Any
- OS: Any
Additional Context
The suppress_parse_errors functionality is already fully implemented in Resolver.resolve() - it just needs to be properly exposed through the parameter routing system.