A custom schemas.

interface TextExtractionSchema {
    document_description: string;
    document_type: string;
    enable_generic_kvp?: boolean;
    enable_text_hints?: boolean;
    fields?: TextExtractionSemanticKvpField;
    target_image_width?: number;
}

Properties

document_description: string

Should be one or two sentences to ensure the LLM gets an accurate understanding.

document_type: string

Should be a short one or two word title like Passport or Bill Of Lading.

enable_generic_kvp?: boolean

Deprecated: Indicates whether to perform generic Key-Value Pair (KVP) extraction and output the generic KVPs along with the semantic KVPs extracted with this custom schema. Defaults to the value defined in the semantic_config section.

enable_text_hints?: boolean

Determines whether to use text hints when extracting values for this schema and the generic KVPs. Defaults to the value defined in the semantic_config section.

A mapping of fields to identify within the schema, where each key is the short-form name of the field, and the corresponding value is an object is a schema as defined below.

target_image_width?: number

Specifies if the input image should be downscaled. Defaults to the value defined in the semantic_config section.