DocumentLibrary.loadModelBuffer Method

Module: DocumentLibrary

Definition

Loads a model into memory from the specified buffer.

@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

An error has occurred during Document Library execution.
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

An error has occurred during Document Library execution.
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

An error has occurred during Document Library execution.
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

An error has occurred during Document Library execution.
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

An error has occurred during Document Library execution.
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.

in The processing unit to use for the model.

Returns

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