Inference V2
Base Inference
- class BaseInference(raw_response)
Base class for V2 inference objects.
- Parameters:
raw_response (dict[str, Any])
- file: InferenceFile
File info for the inference.
- id: str
ID of the inference.
- job: InferenceJob
Job the inference belongs to.
- model: InferenceModel
Model info for the inference.
Base Response
Inference Active Options
- class InferenceActiveOptions(raw_response)
Active options for the inference.
- Parameters:
raw_response (dict[str, Any])
- confidence: bool
Boost the precision and accuracy of all extractions. Calculate confidence scores for all fields, and fill their
confidenceattribute.
- data_schema: DataSchemaActiveOptions
Data schema options provided for the inference.
- polygon: bool
Calculate bounding box polygons for all fields, and fill their
locationsattribute.
- rag: bool
Enhance extraction accuracy with Retrieval-Augmented Generation.
- raw_text: bool
Extract the full text content from the document as strings, and fill the
raw_textattribute.
- text_context: bool
Whether the text context feature was activated. When this feature is activated, the provided context is used to improve the accuracy of the inference.
Inference File
Inference Model
RAG Metadata
Raw Text
- class RawText(raw_response)
Raw text extracted from the document.
- Parameters:
raw_response (dict[str, Any])
- pages: list[RawTextPage]
Pages of raw text content.