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
cacheDirstring
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
urlUriprogressIProgress<(long downloaded, long? total)>ctCancellationToken
Returns
ScanAsync(CancellationToken)
Returns models that have been downloaded via this source.
public Task<IReadOnlyList<ModelMetadata>> ScanAsync(CancellationToken ct = default)