PullModel

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
using var api = new OllamaApiClient();

await foreach (var response in api.Models.PullModelAsync("all-minilm"))
{
    Console.WriteLine($"{response.Status?.Object}. Progress: {response.Completed}/{response.Total}");
}

var responses = await api.Models.PullModelAsync("all-minilm");
responses[^1].EnsureSuccess();

await api.Models.PullModelAsync("all-minilm").EnsureSuccessAsync();