OnenmLocalLlmPlatform class abstract
The platform-agnostic interface that platform-specific implementations must extend.
This follows the federated plugin pattern recommended by Flutter. See: https://docs.flutter.dev/packages-and-plugins/developing-packages#federated-plugins
- Inheritance
-
- Object
- PlatformInterface
- OnenmLocalLlmPlatform
- Implementers
Constructors
- OnenmLocalLlmPlatform()
- Constructs an OnenmLocalLlmPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generate(
String prompt, Map< String, dynamic> settings) → Future<String?> -
Generates text for the given
promptusing the providedsettings. -
initBackend(
) → Future< bool?> -
Initialises the ggml backend. Returns
trueif at least one backend loaded. -
loadModel(
String modelPath) → Future< bool?> -
Loads a GGUF model from the given
modelPath. Returnstrueon success. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pingNative(
) → Future< String?> -
Verifies the native bridge is reachable. Returns
"pong"on success. -
releaseModel(
) → Future< void> - Releases all native resources (model, context, backend).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ OnenmLocalLlmPlatform
-
The default instance of OnenmLocalLlmPlatform to use.
getter/setter pair