Model download feedback

AiBrow ships with a default model, so after installation everything is ready to go. AiBrow also shows the download progress in the extension and as a popup when a model is being downloaded.

There are instances where you might want to show the download progress on your website so the user is informed about the download and install progress. All the top-level APIs in AiBrow support emitting the download progress during the create call.

const session = await ai.coreModel.create({
  monitor(m) {
    m.addEventListener("downloadprogress", e => {
      console.log(`Downloaded ${e.loaded} of ${e.total} bytes.`);
    })
  }
})

Last updated