Table of Contents

Class RemoteUrlModelSource

Namespace
JD.AI.Core.LocalModels.Sources
Assembly
JD.AI.Core.dll

Downloads a GGUF model from a remote HTTP(S) URL.

public sealed class RemoteUrlModelSource : IModelSource
Inheritance
RemoteUrlModelSource
Implements
Inherited Members

Constructors

RemoteUrlModelSource(string)

public RemoteUrlModelSource(string cacheDir)

Parameters

cacheDir string

Methods

DownloadAsync(Uri, IProgress<(long downloaded, long? total)>?, CancellationToken)

Downloads a GGUF file from a URL with progress reporting. Supports resume via HTTP Range headers.

public Task<ModelMetadata> DownloadAsync(Uri url, IProgress<(long downloaded, long? total)>? progress = null, CancellationToken ct = default)

Parameters

url Uri
progress IProgress<(long downloaded, long? total)>
ct CancellationToken

Returns

Task<ModelMetadata>

ScanAsync(CancellationToken)

Returns models that have been downloaded via this source.

public Task<IReadOnlyList<ModelMetadata>> ScanAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task<IReadOnlyList<ModelMetadata>>