createSession method
Creates a new lower-level session from the initialized engine.
Implementation
Future<Session> createSession([
SessionConfig sessionConfig = const SessionConfig(),
]) async {
if (!_isInitialized) {
throw const LiteRtLmException('Engine is not initialized.');
}
final handle = await LiteRtLmNativeRuntime.instance.createSession(
_handle,
sessionConfig,
);
return Session._(handle);
}