File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ export class ChromeAdapter {
257
257
if ( availability === Availability . downloadable ) {
258
258
// Side-effect: triggers out-of-band model download.
259
259
// This is required because Chrome manages the model download.
260
- this . download ( ) ;
260
+ this . download ( createOptions ) ;
261
261
}
262
262
263
263
return availability ;
@@ -267,18 +267,18 @@ export class ChromeAdapter {
267
267
* Triggers out-of-band download of an on-device model.
268
268
*
269
269
* <p>Chrome only downloads models as needed. Chrome knows a model is needed when code calls
270
- * LanguageModel.create.</p>
270
+ * { @link LanguageModel.create} .</p>
271
271
*
272
272
* <p>Since Chrome manages the download, the SDK can only avoid redundant download requests by
273
273
* tracking if a download has previously been requested.</p>
274
274
*/
275
- private download ( ) : void {
275
+ private download ( createOptions : LanguageModelCreateOptions ) : void {
276
276
if ( this . isDownloading ) {
277
277
return ;
278
278
}
279
279
this . isDownloading = true ;
280
280
this . downloadPromise = this . languageModelProvider
281
- ?. create ( this . onDeviceParams . createOptions )
281
+ ?. create ( createOptions )
282
282
. then ( ( ) => {
283
283
this . isDownloading = false ;
284
284
} ) ;
You can’t perform that action at this time.
0 commit comments