Table of Contents

Class ChatOptionsExtensions

Namespace
OllamaSharp
Assembly
OllamaSharp.dll

Extension methods to stream IAsyncEnumerable to its end and return one single result value

public static class ChatOptionsExtensions
Inheritance
ChatOptionsExtensions
Inherited Members

Methods

AddOllamaOption(ChatOptions, OllamaOption, object?)

Adds Ollama specific options to the additional properties of ChatOptions. These can be interpreted and sent to the Ollama API by OllamaSharp.

public static ChatOptions AddOllamaOption(this ChatOptions chatOptions, OllamaOption option, object? value)

Parameters

chatOptions ChatOptions

The chat options to set Ollama options on

option OllamaOption

The Ollama option to set, like OllamaOption.NumCtx for the option 'num_ctx'

value object

The value for the option

Returns

ChatOptions

The Microsoft.Extensions.AI.ChatOptions with the Ollama option set