Ollama 0.9.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ollama --version 0.9.0                
NuGet\Install-Package Ollama -Version 0.9.0                
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="0.9.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ollama --version 0.9.0                
#r "nuget: Ollama, 0.9.0"                
#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=0.9.0

// Install Ollama as a Cake Tool
#tool nuget:?package=Ollama&version=0.9.0                

Ollama SDK for .NET

Nuget package dotnet License: MIT Discord

Generated C# SDK based on Ollama OpenAPI specification using NSwag.

Usage

using Ollama;

using var client = new HttpClient();
var api = new OllamaApi(apiKey, client);
var response = await api.CompleteAsync(new CreateCompletionRequest
{
    Model = ModelIds.ClaudeInstant,
    Prompt = "Once upon a time".AsPrompt(),
    Max_tokens_to_sample = 250,
});
Console.WriteLine(response.Completion);

// or use history syntax

var response = await api.CompleteAsync(new CreateCompletionRequest
{
    Model = ModelIds.ClaudeInstant,
    Prompt = new[]
    {
        "What's the weather like today?".AsHumanMessage(),
        "Sure! Could you please provide me with your location?".AsAssistantMessage(),
        "Dubai, UAE".AsHumanMessage(),
    }.AsPrompt(),
    Max_tokens_to_sample = 300,
});

Support

Priority place for bugs: https://github.com/tryAGI/Ollama/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Ollama/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Product 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.

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 84 11/22/2024
1.12.1-dev.17 34 11/22/2024
1.12.1-dev.16 42 11/21/2024
1.12.1-dev.13 74 11/14/2024
1.12.1-dev.11 38 11/13/2024
1.12.1-dev.10 30 11/13/2024
1.12.1-dev.9 33 11/13/2024
1.12.1-dev.7 48 11/12/2024
1.12.1-dev.4 78 11/1/2024
1.12.1-dev.1 263 10/18/2024
1.12.0 506 10/18/2024
1.11.0 670 9/26/2024
1.10.1-dev.11 45 9/26/2024
1.10.1-dev.9 53 9/24/2024
1.10.1-dev.6 53 9/19/2024
1.10.1-dev.5 41 9/19/2024
1.10.1-dev.4 55 9/17/2024
1.10.1-dev.2 62 9/16/2024
1.10.0 6,987 9/15/2024
1.9.1-dev.4 53 9/15/2024
1.9.1-dev.3 51 9/15/2024
1.9.0 257 9/1/2024
1.8.1 201 8/24/2024
1.8.1-dev.1 71 8/24/2024
1.8.0 120 8/24/2024
1.7.2-dev.9 73 8/21/2024
1.7.2-dev.8 68 8/20/2024
1.7.2-dev.5 70 8/19/2024
1.7.2-dev.4 64 8/19/2024
1.7.2-dev.3 69 8/19/2024
1.7.2-dev.2 75 8/16/2024
1.7.2-dev.1 67 8/16/2024
1.7.1 194 8/16/2024
1.7.1-dev.1 74 8/16/2024
1.7.0 123 8/16/2024
1.6.2-dev.19 64 8/16/2024
1.6.2-dev.12 74 8/15/2024
1.6.2-dev.10 68 8/13/2024
1.6.2-dev.9 63 8/13/2024
1.6.2-dev.7 58 8/12/2024
1.6.2-dev.6 53 8/12/2024
1.6.2-dev.5 58 8/12/2024
1.6.2-dev.4 44 8/6/2024
1.6.2-dev.3 37 8/6/2024
1.6.2-dev.2 43 8/5/2024
1.6.1 238 7/30/2024
1.6.1-dev.7 38 7/30/2024
1.6.1-dev.6 36 7/29/2024
1.6.1-dev.4 49 7/29/2024
1.6.1-dev.3 53 7/29/2024
1.6.1-dev.2 46 7/29/2024
1.6.1-dev.1 49 7/29/2024
1.6.0 96 7/29/2024
1.5.2-dev.2 52 7/29/2024
1.5.2-dev.1 63 7/25/2024
1.5.1 114 7/25/2024
1.4.3 1,149 7/14/2024
1.4.2 97 7/12/2024
1.4.1 129 7/8/2024
1.3.2 2,004 6/6/2024
1.3.1 109 6/5/2024
1.3.0 108 6/5/2024
1.2.0 160 5/26/2024
1.1.3 140 5/23/2024
1.1.2 112 5/22/2024
1.1.1 371 5/21/2024
1.1.0 121 5/20/2024
1.0.0 284 5/12/2024
0.9.4 94 5/11/2024
0.9.3 89 5/11/2024
0.9.2 94 5/11/2024
0.9.0 103 5/10/2024
0.0.0-dev.53 50 7/25/2024
0.0.0-dev.52 61 7/25/2024