UnparseableOutputHandling
How AI extraction responds when the model’s output never parses against the requested schema (all retry attempts exhausted).
from nutrient_sdk import UnparseableOutputHandlingValues
| Name | Value | Description |
|---|---|---|
UnparseableOutputHandling.DEFAULT | 0 | Each API surface keeps its own default: the SDK’s structured-extraction API fails the call with a descriptive error; server pipelines (daemon actions, DWS) return an empty result with the failure recorded in diagnostics warnings. |
UnparseableOutputHandling.FAIL | 1 | Fail the extraction call with an error naming the parse failure and an excerpt of the content that arrived. A wrong or empty result is never reported as success. |
UnparseableOutputHandling.RETURN_EMPTY | 2 | Return an empty extraction result and record the failure in diagnostics warnings — keeps batch pipelines running when individual documents fail. |
Usage Example
from nutrient_sdk import UnparseableOutputHandling
# Access enum valuesvalue = UnparseableOutputHandling.DEFAULTprint(f"Value: {value}") # Output: Value: UnparseableOutputHandling.DEFAULTprint(f"Integer value: {value.value}") # Output: Integer value: 0