Ollama 1.1.2
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Ollama --version 1.1.2
NuGet\Install-Package Ollama -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ollama" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ollama --version 1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ollama, 1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ollama as a Cake Addin #addin nuget:?package=Ollama&version=1.1.2 // Install Ollama as a Cake Tool #tool nuget:?package=Ollama&version=1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ollama SDK for .NET 🦙
Generated C# SDK based on Ollama OpenAPI specification and official docs using OpenApiGenerator.
Features 🔥
- Intuitive API client: Set up and interact with Ollama in just a few lines of code.
- API endpoint coverage: Support for all Ollama API endpoints including chats, embeddings, listing models, pulling and creating new models, and more.
- Real-time streaming: Stream responses directly to your application.
- Progress reporting: Get real-time progress feedback on tasks like model pulling.
Usage
Initializing
var ollama = new OllamaApiClient();
var models = await ollama.ListModelsAsync();
// Pulling a model and reporting progress
await ollama.PullModelAsync("mistral", status => Console.WriteLine($"({status.Percent}%) {status.Status}"));
// Streaming a completion directly into the console
// keep reusing the context to keep the chat topic going
IList<long>? context = null;
var enumerable = api.GetCompletionAsync("mistral", "How are you today?");
await foreach (var response in enumerable)
{
Console.Write(response.Response);
context = response.Context;
}
var lastResponse = await api.GetCompletionAsync("mistral", "How are you today?", stream: false).WaitAsync();
context = response.lastResponse;
Console.WriteLine(lastResponse.Response);
var chat = container.ApiClient.Chat("mistral");
while (true)
{
var message = await chat.SendAsync("answer 123");
Console.WriteLine(message.Content);
var newMessage = Console.ReadLine();
await chat.Send(newMessage);
}
Credits
Icon and name were reused from the amazing Ollama project. The project was forked from this repository, after which automatic code generation was applied based on this OpenAPI specification (in the future it will be replaced by the official one, if one appears)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.2
- Ollama.Models (>= 1.1.2)
- System.Text.Json (>= 8.0.3)
-
.NETStandard 2.0
- Ollama.Models (>= 1.1.2)
- System.Text.Json (>= 8.0.3)
-
net6.0
- Ollama.Models (>= 1.1.2)
- System.Text.Json (>= 8.0.3)
-
net8.0
- Ollama.Models (>= 1.1.2)
- System.Text.Json (>= 8.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Ollama:
Package | Downloads |
---|---|
LangChain.Providers.Ollama
Ollama Chat model provider. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.13.0 | 556 | 11/22/2024 |
1.12.1-dev.17 | 42 | 11/22/2024 |
1.12.1-dev.16 | 54 | 11/21/2024 |
1.12.1-dev.13 | 88 | 11/14/2024 |
1.12.1-dev.11 | 48 | 11/13/2024 |
1.12.1-dev.10 | 38 | 11/13/2024 |
1.12.1-dev.9 | 43 | 11/13/2024 |
1.12.1-dev.7 | 59 | 11/12/2024 |
1.12.1-dev.4 | 84 | 11/1/2024 |
1.12.1-dev.1 | 429 | 10/18/2024 |
1.12.0 | 535 | 10/18/2024 |
1.11.0 | 710 | 9/26/2024 |
1.10.1-dev.11 | 50 | 9/26/2024 |
1.10.1-dev.9 | 56 | 9/24/2024 |
1.10.1-dev.6 | 56 | 9/19/2024 |
1.10.1-dev.5 | 46 | 9/19/2024 |
1.10.1-dev.4 | 58 | 9/17/2024 |
1.10.1-dev.2 | 65 | 9/16/2024 |
1.10.0 | 13,997 | 9/15/2024 |
1.9.1-dev.4 | 59 | 9/15/2024 |
1.9.1-dev.3 | 55 | 9/15/2024 |
1.9.0 | 282 | 9/1/2024 |
1.8.1 | 211 | 8/24/2024 |
1.8.1-dev.1 | 76 | 8/24/2024 |
1.8.0 | 127 | 8/24/2024 |
1.7.2-dev.9 | 78 | 8/21/2024 |
1.7.2-dev.8 | 71 | 8/20/2024 |
1.7.2-dev.5 | 75 | 8/19/2024 |
1.7.2-dev.4 | 69 | 8/19/2024 |
1.7.2-dev.3 | 74 | 8/19/2024 |
1.7.2-dev.2 | 80 | 8/16/2024 |
1.7.2-dev.1 | 71 | 8/16/2024 |
1.7.1 | 205 | 8/16/2024 |
1.7.1-dev.1 | 79 | 8/16/2024 |
1.7.0 | 130 | 8/16/2024 |
1.6.2-dev.19 | 67 | 8/16/2024 |
1.6.2-dev.12 | 79 | 8/15/2024 |
1.6.2-dev.10 | 71 | 8/13/2024 |
1.6.2-dev.9 | 66 | 8/13/2024 |
1.6.2-dev.7 | 65 | 8/12/2024 |
1.6.2-dev.6 | 58 | 8/12/2024 |
1.6.2-dev.5 | 63 | 8/12/2024 |
1.6.2-dev.4 | 49 | 8/6/2024 |
1.6.2-dev.3 | 46 | 8/6/2024 |
1.6.2-dev.2 | 50 | 8/5/2024 |
1.6.1 | 341 | 7/30/2024 |
1.6.1-dev.7 | 41 | 7/30/2024 |
1.6.1-dev.6 | 41 | 7/29/2024 |
1.6.1-dev.4 | 54 | 7/29/2024 |
1.6.1-dev.3 | 56 | 7/29/2024 |
1.6.1-dev.2 | 52 | 7/29/2024 |
1.6.1-dev.1 | 54 | 7/29/2024 |
1.6.0 | 103 | 7/29/2024 |
1.5.2-dev.2 | 57 | 7/29/2024 |
1.5.2-dev.1 | 66 | 7/25/2024 |
1.5.1 | 121 | 7/25/2024 |
1.4.3 | 1,187 | 7/14/2024 |
1.4.2 | 110 | 7/12/2024 |
1.4.1 | 139 | 7/8/2024 |
1.3.2 | 2,284 | 6/6/2024 |
1.3.1 | 118 | 6/5/2024 |
1.3.0 | 115 | 6/5/2024 |
1.2.0 | 167 | 5/26/2024 |
1.1.3 | 151 | 5/23/2024 |
1.1.2 | 123 | 5/22/2024 |
1.1.1 | 380 | 5/21/2024 |
1.1.0 | 130 | 5/20/2024 |
1.0.0 | 309 | 5/12/2024 |
0.9.4 | 101 | 5/11/2024 |
0.9.3 | 96 | 5/11/2024 |
0.9.2 | 101 | 5/11/2024 |
0.9.0 | 112 | 5/10/2024 |
0.0.0-dev.53 | 55 | 7/25/2024 |
0.0.0-dev.52 | 64 | 7/25/2024 |