Namespace: Microsoft.AI.Foundry.Local
public class Model : IModelInheritance Object → Model
Implements IModel
Attributes NullableContextAttribute, NullableAttribute
public IReadOnlyList<IModel> Variants { get; }public string Alias { get; set; }public string Id { get; }public ModelInfo Info { get; }Is the currently selected variant cached locally?
public Task<bool> IsCachedAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
Is the currently selected variant loaded in memory?
public Task<bool> IsLoadedAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
Select a specific model variant from Model.Variants to use for IModel operations.
public void SelectVariant(IModel variant)variant IModel
Model variant to select. Must be one of the variants in Model.Variants.
FoundryLocalException
If variant is not valid for this model.
public Task<string> GetPathAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
public Task DownloadAsync(Action<float> downloadProgress, Nullable<CancellationToken> ct)downloadProgress Action<Single>
ct Nullable<CancellationToken>
public Task LoadAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
public Task<OpenAIChatClient> GetChatClientAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
public Task<OpenAIAudioClient> GetAudioClientAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
public Task<OpenAIEmbeddingClient> GetEmbeddingClientAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
public Task UnloadAsync(Nullable<CancellationToken> ct)ct Nullable<CancellationToken>
public Task RemoveFromCacheAsync(Nullable<CancellationToken> ct)