Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# DocumentLibrary.loadModelBuffer Method

Module: DocumentLibrary

## Definition

Loads a model into memory from the specified buffer.

Python

    @staticmethod
    load_model_buffer(model_buffer: bytearray, document_model: DocumentModel, processing_unit: ProcessingUnit) -> None

Parameters

> `model_buffer` bytearray
> in A buffer containing the AI model to be loaded.
> `document_model` DocumentModel
> in Doc model to load.
> `processing_unit` ProcessingUnit
> in The processing unit to use for the model.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Dart

    static void loadModelBuffer(Uint8List? modelBuffer, DocumentModel documentModel, ProcessingUnit processingUnit)

Parameters

> `modelBuffer` Uint8List
> in A buffer containing the AI model to be loaded.
> `documentModel` DocumentModel
> in Doc model to load.
> `processingUnit` ProcessingUnit
> in The processing unit to use for the model.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C#

    public static void LoadModelBuffer(byte[] modelBuffer, DocumentModel documentModel, ProcessingUnit processingUnit)

Parameters

> `modelBuffer` byte[]
> in A buffer containing the AI model to be loaded.
> `documentModel` DocumentModel
> in Doc model to load.
> `processingUnit` ProcessingUnit
> in The processing unit to use for the model.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Java

    public static void loadModelBuffer(byte[] modelBuffer, DocumentModel documentModel, ProcessingUnit processingUnit) throws DocumentException

Parameters

> `modelBuffer` byte[]
> in A buffer containing the AI model to be loaded.
> `documentModel` DocumentModel
> in Doc model to load.
> `processingUnit` ProcessingUnit
> in The processing unit to use for the model.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

Swift

    public static func loadModelBuffer(modelBuffer: [UInt8], documentModel: DocumentModel, processingUnit: ProcessingUnit) throws

Parameters

> `modelBuffer` [UInt8]
> in A buffer containing the AI model to be loaded.
> `documentModel` DocumentModel
> in Doc model to load.
> `processingUnit` ProcessingUnit
> in The processing unit to use for the model.

Exceptions

> DocumentException
> An error has occurred during Document Library execution.

C

    int id3DocumentLibrary_LoadModelBuffer (
        unsigned char * modelBuffer,
        int modelBufferSize,
        id3DocumentModel eDocumentModel,
        id3DocumentProcessingUnit eProcessingUnit)

Parameters

> `modelBuffer` unsigned char *
> in A buffer containing the AI model to be loaded.
> `modelBufferSize` int
> in Size of the ‘modelBuffer’ buffer.
> `eDocumentModel` id3DocumentModel
> in Doc model to load.
> `eProcessingUnit` id3DocumentProcessingUnit
> in The processing unit to use for the model.

Returns

> `int`
> An error code.
> See id3DocumentError file for the list of possible error codes.