Namespace: Microsoft.AI.Foundry.Local
public interface ICatalogAttributes NullableContextAttribute
The catalog name.
public abstract string Name { get; }List the available models in the catalog.
Task<List<IModel>> ListModelsAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
Optional CancellationToken.
Task<List<IModel>>
List of IModel instances.
Lookup a model by its alias.
Task<IModel> GetModelAsync(string modelAlias, Nullable<CancellationToken> ct)modelAlias String
Model alias.
ct Nullable<CancellationToken>
Optional CancellationToken.
Task<IModel>
The matching IModel, or null if no model with the given alias exists.
Lookup a model variant by its unique model id. NOTE: This will return an IModel with a single variant. Use GetModelAsync to get an IModel with all available variants.
Task<IModel> GetModelVariantAsync(string modelId, Nullable<CancellationToken> ct)modelId String
Model id.
ct Nullable<CancellationToken>
Optional CancellationToken.
Task<IModel>
The matching IModel, or null if no variant with the given id exists.
Get a list of currently downloaded models from the model cache.
Task<List<IModel>> GetCachedModelsAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
Optional CancellationToken.
Task<List<IModel>>
List of IModel instances.
Get a list of the currently loaded models.
Task<List<IModel>> GetLoadedModelsAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
Optional CancellationToken.
Task<List<IModel>>
List of IModel instances.
Get the latest version of a model. This is used to check if a newer version of a model is available in the catalog for download.
Task<IModel> GetLatestVersionAsync(IModel model, Nullable<CancellationToken> ct)model IModel
The model to check for the latest version.
ct Nullable<CancellationToken>
Optional cancellation token.
Task<IModel>
The latest version of the model. Will match the input if it is the latest version.