GeminiNanoAndroidPlatform class abstract
The interface that implementations of gemini_nano_android must implement.
Platform implementations should extend this class rather than implement it as GeminiNanoAndroid
does not consider newly added methods to be breaking changes. Extending this class
(using extends) ensures that the subclass will get the default implementation, while
platform implementations that implements this interface will be broken by newly added
GeminiNanoAndroidPlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- GeminiNanoAndroidPlatform
- Implementers
Constructors
- GeminiNanoAndroidPlatform()
- Constructs a GeminiNanoAndroidPlatform.
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(
{required String prompt, double? temperature, int? seed, int? topK, int? candidateCount, int? maxOutputTokens}) → Future< List< String> > - Generates a list of strings based on a prompt using the on-device model.
-
getModelVersion(
) → Future< String?> - Returns the model version used.
-
isAvailable(
) → Future< bool> - Checks if the device supports Gemini Nano via AICore.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ GeminiNanoAndroidPlatform
-
The default instance of GeminiNanoAndroidPlatform to use.
getter/setter pair