Table of Contents

Method DownloadAsync

Namespace
LMKit.Model
Assembly
LM-Kit.NET.dll

DownloadAsync(ModelDownloadingProgressCallback)

Asynchronously downloads the model file from its specified URI and saves it locally.

public Task DownloadAsync(LM.ModelDownloadingProgressCallback downloadingProgress = null)

Parameters

downloadingProgress LM.ModelDownloadingProgressCallback

An optional callback of type LM.ModelDownloadingProgressCallback that is invoked to report download progress. The callback receives the temporary download path, the total content length (in bytes, if available), and the number of bytes downloaded so far. It should return a bool indicating whether the download should continue.

Returns

Task

A Task representing the asynchronous download operation.

Remarks

The method determines the local storage path for the model based on its URI. If the model file already exists locally, the method returns immediately without performing any download.