Skip to content

Releases: awaescher/OllamaSharp

Release 5.1.3

04 Mar 15:01
5c574d3
Compare
Choose a tag to compare

Release 5.1.2

24 Feb 16:55
176a87a
Compare
Choose a tag to compare
  • Improved tool usage with source generators #171 (preview)

Note

This is a preview feature. See #171 for more details.

All that's required to use tools with OllamaSharp is decorating static methods with the [OllamaTool] attribute. OllamaSharp will automatically generate the required code that describes the tool's metadata and invokes the method automatically if requested by the LLM.

It's highly recommended to write a complete summary including the arguments as the summary is used to describe the method and its arguments to the LLM.

/// <summary>
/// Gets the current weather for a given location.
/// </summary>
/// <param name="location">The location or city to get the weather for</param>
/// <param name="unit">The unit to measure the temperature in</param>
/// <returns>The weather for the given location</returns>
[OllamaTool]
public static string GetWeather(string location, Unit unit) => $"It's cold at only 6° {unit} in {location}.";

You can find the generated code for the tools under the Dependencies node in your project:

image

Release 5.1.1

21 Feb 16:22
99ce812
Compare
Choose a tag to compare
  • Improved tool usage with source generators #171 (preview)

Note

This is a preview feature. See #171 for more details.

All that's required to use tools with OllamaSharp is decorating static methods with the [OllamaTool] attribute. OllamaSharp will automatically generate the required code that describes the tool's metadata and invokes the method automatically if requested by the LLM.

It's highly recommended to write a complete summary including the arguments as the summary is used to describe the method and its arguments to the LLM.

/// <summary>
/// Gets the current weather for a given location.
/// </summary>
/// <param name="location">The location or city to get the weather for</param>
/// <param name="unit">The unit to measure the temperature in</param>
/// <returns>The weather for the given location</returns>
[OllamaTool]
public static string GetWeather(string location, Unit unit) => $"It's cold at only 6° {unit} in {location}.";

You can find the generated code for the tools under the Dependencies node in your project:

image

Release 5.1.0

21 Feb 16:01
57f781e
Compare
Choose a tag to compare
  • Improved tool usage with source generators #171 (preview)

Note

This is a preview feature. See #171 for more details.

All that's required to use tools with OllamaSharp is decorating static methods with the [OllamaTool] attribute. OllamaSharp will automatically generate the required code that describes the tool's metadata and invokes the method automatically if requested by the LLM.

It's highly recommended to write a complete summary including the arguments as the summary is used to describe the method and its arguments to the LLM.

/// <summary>
/// Gets the current weather for a given location.
/// </summary>
/// <param name="location">The location or city to get the weather for</param>
/// <param name="unit">The unit to measure the temperature in</param>
/// <returns>The weather for the given location</returns>
[OllamaTool]
public static string GetWeather(string location, Unit unit) => $"It's cold at only 6° {unit} in {location}.";

You can find the generated code for the tools under the Dependencies node in your project:

image

Release 5.0.7

17 Feb 11:11
39d42d6
Compare
Choose a tag to compare
  • Updated Microsoft.Extensions.AI to 9.3.0-preview.1.25114.11 #188

Thanks to @stephentoub

Release 5.0.6

03 Feb 10:23
9bf2377
Compare
Choose a tag to compare
  • Fixed object conversion when using Semantic Kernel #183

Thanks @MarkWard0110

Release 5.0.5

31 Jan 07:30
8c3b956
Compare
Choose a tag to compare
  • Added support for structured output when using Microsoft.Extensions.AI #180

Thanks @jmatthiesen and @stephentoub

Release 5.0.4

27 Jan 10:32
cc180cc
Compare
Choose a tag to compare

Thanks @mili-tan and me 🙈

Release 5.0.3

22 Jan 06:32
71ccc5e
Compare
Choose a tag to compare
  • Added the mapping from Micosoft's MaxOutputTokens to Ollama's NumPredict #175

Thanks @Puchaczov

Release 5.0.2

15 Jan 19:45
7d5ffbb
Compare
Choose a tag to compare
  • Updated Microsoft.Extensions.AI.Abstractions to 9.1.0-preview.1.25064.3 #172

Thanks @stephentoub