BuiltInAiService class
Constructors
- BuiltInAiService({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
-
Constructor for BuiltInAiService. The
binaryMessengernamed argument is available for dependency injection. If it is left null, the default BinaryMessenger will be used which routes to the host platform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- pigeonVar_binaryMessenger → BinaryMessenger?
-
final
- pigeonVar_messageChannelSuffix → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addImage(
{required int sessionId, required Uint8List imageBytes}) → Future< void> -
addQueryChunk(
{required int sessionId, required String text}) → Future< void> -
checkAvailability(
) → Future< AvailabilityStatus> -
closeModel(
) → Future< void> -
closeSession(
int sessionId) → Future< void> -
countTokens(
String text) → Future< int> -
createModel(
{required bool supportImage}) → Future< void> -
createSession(
{required int sessionId, required double temperature, required int topK, double? topP, int? maxOutputTokens, String? systemInstruction}) → Future< void> -
downloadFeature(
) → Future< void> - Starts the OS feature download (AICore). Progress arrives on the event channel as {code: DOWNLOAD_PROGRESS, bytesDownloaded, bytesTotal}. No-op on darwin (returns immediately; readiness is user-controlled).
-
generateResponse(
int sessionId) → Future< String> -
generateResponseAsync(
int sessionId) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stopGeneration(
int sessionId) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
pigeonChannelCodec
→ const MessageCodec<
Object?>