Class HuggingFaceModelSource
- Namespace
- JD.AI.Core.LocalModels.Sources
- Assembly
- JD.AI.Core.dll
Searches HuggingFace Hub for GGUF model files.
public sealed class HuggingFaceModelSource : IModelSource
- Inheritance
-
HuggingFaceModelSource
- Implements
- Inherited Members
Constructors
HuggingFaceModelSource(string)
public HuggingFaceModelSource(string cacheDir)
Parameters
cacheDirstring
Methods
GetDownloadUrl(string, string)
Construct a download URL for a specific file in a HuggingFace repo.
public static Uri GetDownloadUrl(string repoId, string filename)
Parameters
Returns
ScanAsync(CancellationToken)
Scans locally cached HuggingFace models (does not download).
public Task<IReadOnlyList<ModelMetadata>> ScanAsync(CancellationToken ct = default)
Parameters
Returns
SearchAsync(string, int, CancellationToken)
Search HuggingFace Hub API for GGUF model repos.
public Task<IReadOnlyList<HuggingFaceSearchResult>> SearchAsync(string query, int limit = 20, CancellationToken ct = default)
Parameters
querystringlimitintctCancellationToken