initialize method

Future<void> initialize()

Initializes the native LiteRT-LM engine.

Implementation

Future<void> initialize() async {
  if (_isInitialized) {
    throw const LiteRtLmException('Engine is already initialized.');
  }
  await LiteRtLmNativeRuntime.instance.initializeEngine(_handle);
  _isInitialized = true;
}