IntelligenceServiceApi class

API for Intelligence Service operations

Constructors

IntelligenceServiceApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
Constructor for IntelligenceServiceApi. The binaryMessenger named 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

deleteModelFiles(String name) Future<void>
Delete downloaded model files
downloadModelFiles(String name) Future<void>
Download model files. Progress is not part of this Pigeon API; the Dart IntelligenceService.downloadModelFiles wrapper uses EventChannel when onProgress is set.
getDownloadedModelsList() Future<List<String?>>
Get list of downloaded model names
getManagedAIModel(String name) Future<Object?>
Get a single managed AI model by name
getManagedAIModels() Future<List<Object?>>
Get all managed AI models
getRule(String name) Future<Object?>
Get a single rule by name
getRules() Future<List<Object?>>
Get all rules
invokeModel(String key, List<PromptPigeon?> prompts, InferenceParamsPigeon? inferenceParams) Future<String>
Invoke a model; returns the final string only. Token streaming is not on this Pigeon method; IntelligenceService.invokeModel uses EventChannel when onStream is set.
isModelFilesDownloaded(String name) Future<bool>
Check if model files are downloaded
isModelLoaded(String key) Future<bool>
Check if a model is currently loaded under the provided key.
loadModel(String name, String key, ModelParamsPigeon? modelParams) Future<void>
Common-only Flutter parity surface (Android+iOS intersection). Native-only methods (e.g. Android getMeDataPrompt, iOS isModelLoaded) are intentionally excluded here. Load a model with optional parameters. name is the catalog model id; key identifies the loaded instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runRule(String name) Future<Object?>
Run a specific rule by name
runRules(bool onlyOnInit) Future<List<Object?>>
Run all rules (optionally only those marked for init)
saveManagedAIModel(String id, String? name, String? text, String? modelDescription, String? downloadUrl, String? imageUrl) Future<String>
Save or update a managed AI model and returns saved model id.
stopModelInference(String key) Future<void>
Stops ongoing inference for the given loaded model key.
syncManagedAIModels() Future<void>
Synchronize managed AI models from the backend
syncRules() Future<void>
Synchronize rules from the backend
toString() String
A string representation of this object.
inherited
unloadModel(String? key) Future<void>
Unload a loaded model by key, or pass null to unload per native SDK rules.

Operators

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

Constants

pigeonChannelCodec → const MessageCodec<Object?>