downloadModel method
Triggers the on-device model download for feature (if one is needed)
and streams progress updates until it completes or fails.
Implementation
@override
Stream<EdgeGenAIDownloadProgress> downloadModel(EdgeGenAIFeature feature) {
switch (feature) {
case EdgeGenAIFeature.prompt:
return promptDownloadProgress();
case EdgeGenAIFeature.summarization:
return summarizationDownloadProgress();
case EdgeGenAIFeature.proofreading:
return proofreadingDownloadProgress();
case EdgeGenAIFeature.rewriting:
return rewritingDownloadProgress();
case EdgeGenAIFeature.imageDescription:
return imageDescriptionDownloadProgress();
}
}