Skip to content

Releases: awaescher/OllamaSharp

Release 5.2.9

13 Jul 18:25
383eada

Choose a tag to compare

  • Add support for "Think" with Microsoft.Extensions.AI ChatOptions #280

Thanks @Jimex

Release 5.2.8

10 Jul 10:10
b5af1e4

Choose a tag to compare

Improved the source code generator for Ollama tools:

  • supports line breaks in summaries (#251)
  • supports tools without namespace (#262)
  • won't cause warnings for missing XML documentation of the generator tool class (#263)

Recap: Providing tools is as simple as implementing a method and decorating it with the OllamaTool attribute.

/// <summary>
/// Get the current weather for a city
/// </summary>
/// <param name="city">Name of the city</param>
[OllamaTool]
public static string GetWeather(string city) => $"It's cold at only 6°C in {city}.";

Make sure to add <GenerateDocumentationFile>true</GenerateDocumentationFile> to your project file to include the XML documentation when building.

See tool support for more information.

Release 5.2.7

07 Jul 06:21
4ca40d8

Choose a tag to compare

Improvements to the Chat class

  • Adds support for multiple tool calls
  • Adds an event OnThink that gets fired for thinking tokens if Think is set to true
  • Adds an event OnToolCall that gets fired once the AI model wants to call a tool
  • Adds an event OnToolResult that gets fired once a result is available for a tool call that the AI model requested

Demo Console:

  • Prints tool calls as they happen in between messages from the AI model

Release 5.2.6

04 Jul 07:14
0cbc77f

Choose a tag to compare

The Chat class can now yield thoughts over OnThink(string) when thinking is allowed (Think=true) #273.

You can easily experiment with this in the console demos by using the command /togglethink that switches the think mode from nullfalsetruenull ...

Bildschirmfoto 2025-07-04 um 09 09 02

Release 5.2.5

04 Jul 05:56
a5553d2

Choose a tag to compare

  • Skip initializing Think property #271
  • Return typed MCP tools from GetFromMcpServers() #260

Release 5.2.4

04 Jul 05:53
df2ff40

Choose a tag to compare

  • Add token usage to last value produced by IChatClient.GetStreamingResponseAsync() #270

Thanks @jmickeyd

Release 5.2.3

23 Jun 14:31
3c307ad

Choose a tag to compare

  • Update ModelContextProtocol to version 0.2.0-preview.3

Thanks @RynFaulkner

Release 5.2.2

30 May 11:24
dd90ff2

Choose a tag to compare

  • Make Chat.Think nullable, used for set null to do not parse <think> #256 - thanks @mili-tan

→ learn more about think in release 5.2.0

Release 5.2.1

30 May 10:26
34ddb7d

Choose a tag to compare

  • Support think with Chat #255

→ learn more about think in release 5.2.0

Release 5.2.0

30 May 11:26

Choose a tag to compare

  • Add support for think and thinking with Ollama 0.9 #254 - thanks @mili-tan

Important notes

The Think parameter controls whether the models are allowed to reason and how the reasoning tokens are handled.

Reasoning model Marked "thinking" in Ollama library Think=false Think=true
Yes Yes Disables reasoning Enables reasoning + Separates reasoning tokens in Message.Thinking
Yes No Reasoning stays enabled + Reasoning tags will appear as <think></think> in the models response Error: Model does not support thinking → Download the model again
No No No effect Error: Model does not support thinking