EdgeGenAIPlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • EdgeGenAIPlatform
Implementers

Constructors

EdgeGenAIPlatform()
Constructs a EdgeGenAIPlatform.

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

checkAvailability(EdgeGenAIFeature feature) Future<EdgeGenAIAvailability>
Checks whether the on-device feature is available.
describeImage(Uint8List imageBytes) Future<String>
Describes the image encoded in imageBytes (for example PNG or JPEG bytes) and returns the description.
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.
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
proofread(String text) Future<String>
Proofreads text and returns the corrected text.
resetConversation(String sessionId) Future<void>
Clears the conversation history remembered for sessionId so that instance's next generateContent call starts a fresh conversation.
rewrite(String text, {required EdgeGenAIRewriteStyle style}) Future<String>
Rewrites text in the given style and returns the rewritten text.
summarize(String text) Future<String>
Summarizes text and returns the summary.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance EdgeGenAIPlatform
The default instance of EdgeGenAIPlatform to use.
getter/setter pair