LocalAiProcessingSettings
Settings for LocalAiProcessing. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.
Tags: Vision, Advanced
from nutrient_sdk import LocalAiProcessingSettingsConstruction
LocalAiProcessingSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith Document.open("input.pdf") as doc: settings = doc.settings.local_ai_processing_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.local_ai_processing_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.local_ai_processing_settings = other_settings is rejected.
Properties
context_tokens
@propertydef context_tokens(self) -> int
@context_tokens.setterdef context_tokens(self, value: int) -> NoneContext size in tokens; 0 uses the engine default (4096). The context holds the document text, the schema and the reply together, and a single dense page with source locations already needs about 20,000 tokens, so the default value is 32768. Documents larger than the context are split into page windows automatically.
Type: int
Default: 32768
gpu_layers
@propertydef gpu_layers(self) -> int
@gpu_layers.setterdef gpu_layers(self, value: int) -> NoneModel layers to offload to GPU; 0 is pure CPU. The default value is 99, which offloads all available layers. Metal is built in on macOS; the CUDA backend is runtime-provisioned on Linux x64.
Type: int
Default: 99
image_min_tokens
@propertydef image_min_tokens(self) -> int
@image_min_tokens.setterdef image_min_tokens(self, value: int) -> NoneMinimum image tokens for dynamic-resolution vision models; 0 uses the model default. Only relevant when page images are attached to the schema request.
Type: int
Default: 1024
max_concurrency
@propertydef max_concurrency(self) -> int
@max_concurrency.setterdef max_concurrency(self, value: int) -> NoneMaximum number of concurrent calls. Sizes the in-process context pool: the model weights are shared, each extra context costs only its KV/compute buffers and runs one more call in parallel (callers beyond the pool block for a free context).
Type: int
Default: 1
mmproj_path
@propertydef mmproj_path(self) -> str
@mmproj_path.setterdef mmproj_path(self, value: str) -> NoneFilesystem path to the matching multimodal projector (mmproj) GGUF. Set it together with model_path; the in-process binding requires it even for text-only prompts.
Type: str
Default: string.Empty
model_path
@propertydef model_path(self) -> str
@model_path.setterdef model_path(self, value: str) -> NoneFilesystem path to the GGUF model used for structured extraction. Set it together with mmproj_path to use a custom model. When both are empty, structured extraction downloads the default local model on first use (the same model the vision-parse step uses).
Type: str
Default: string.Empty
threads
@propertydef threads(self) -> int
@threads.setterdef threads(self, value: int) -> NoneInference threads; 0 uses the engine default.
Type: int
Default: 0