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
- class BaseResponse(raw_response)
Base class for V2 inference responses.
- Parameters:
raw_response (dict[str, Any])
- classmethod get_result_slug()
Getter for the inference slug.
- Return type:
str
- inference: BaseInference
The inference result for a split utility request
- property raw_http: str
Displays the result of the raw response as json string.
Inference Active Options
- class InferenceActiveOptions(raw_response)
Active options for the inference.
- Parameters:
raw_response (dict[str, Any])
- confidence: bool
Whether the confidence feature was activated. When this feature is activated, a confidence score for each field is returned in the result.
- data_schema: DataSchemaActiveOptions
Data schema options provided for the inference.
- polygon: bool
Whether the polygon feature was activated. When this feature is activated, the bounding-box polygon(s) for each field is returned in the result.
- rag: bool
Whether the Retrieval-Augmented Generation feature was activated. When this feature is activated, the RAG pipeline is used to increase result accuracy.
- raw_text: bool
Whether the Raw Text feature was activated. When this feature is activated, the raw text extracted from the document is returned in the result.
- 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
- class RAGMetadata(raw_response)
Metadata about the RAG operation.
- Parameters:
raw_response (dict[str, Any])
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.