MethodChannelEdgeGenAI class
- Inheritance
-
- Object
- PlatformInterface
- EdgeGenAIPlatform
- MethodChannelEdgeGenAI
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostApi → EdgeGenAIHostApi
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkAvailability(
EdgeGenAIFeature feature) → Future< EdgeGenAIAvailability> -
Checks whether the on-device
featureis available.override -
describeImage(
Uint8List imageBytes) → Future< String> -
Describes the image encoded in
imageBytes(for example PNG or JPEG bytes) and returns the description.override -
downloadModel(
EdgeGenAIFeature feature) → Stream< EdgeGenAIDownloadProgress> -
Triggers the on-device model download for
feature(if one is needed) and streams progress updates until it completes or fails.override -
generateContent(
String sessionId, String prompt, {EdgeGenAIGenerationOptions? options, bool useMemory = false, Uint8List? image, List< EdgeGenAITool> tools = const []}) → Stream<String> -
Sends
prompt(and, optionally,image) to the on-device model and streams its generated text.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
proofread(
String text) → Future< String> -
Proofreads
textand returns the corrected text.override -
resetConversation(
String sessionId) → Future< void> -
Clears the conversation history remembered for
sessionIdso that instance's next generateContent call starts a fresh conversation.override -
rewrite(
String text, {required EdgeGenAIRewriteStyle style}) → Future< String> -
Rewrites
textin the givenstyleand returns the rewritten text.override -
summarize(
String text) → Future< String> -
Summarizes
textand returns the summary.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited