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
chatOptionsChatOptionsThe chat options to set Ollama options on
optionOllamaOptionThe Ollama option to set, like OllamaOption.NumCtx for the option 'num_ctx'
valueobjectThe value for the option
Returns
- ChatOptions
The Microsoft.Extensions.AI.ChatOptions with the Ollama option set