Share via


OllamaKernelBuilderExtensions.AddOllamaChatCompletion Method

Definition

Overloads

AddOllamaChatCompletion(IKernelBuilder, OllamaApiClient, String)

Add Ollama Chat Completion service to the kernel builder.

AddOllamaChatCompletion(IKernelBuilder, String, HttpClient, String)

Add Ollama Chat Completion service to the kernel builder.

AddOllamaChatCompletion(IKernelBuilder, String, Uri, String)

Add Ollama Chat Completion service to the kernel builder.

AddOllamaChatCompletion(IKernelBuilder, OllamaApiClient, String)

Add Ollama Chat Completion service to the kernel builder.

public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaChatCompletion(this Microsoft.SemanticKernel.IKernelBuilder builder, OllamaSharp.OllamaApiClient? ollamaClient = default, string? serviceId = default);
static member AddOllamaChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * OllamaSharp.OllamaApiClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaChatCompletion (builder As IKernelBuilder, Optional ollamaClient As OllamaApiClient = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The kernel builder.

ollamaClient
OllamaSharp.OllamaApiClient

The Ollama Sharp library client.

serviceId
String

The optional service ID.

Returns

The updated kernel builder.

Applies to

AddOllamaChatCompletion(IKernelBuilder, String, HttpClient, String)

Add Ollama Chat Completion service to the kernel builder.

public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaChatCompletion(this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, System.Net.Http.HttpClient? httpClient = default, string? serviceId = default);
static member AddOllamaChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * System.Net.Http.HttpClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaChatCompletion (builder As IKernelBuilder, modelId As String, Optional httpClient As HttpClient = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The kernel builder.

modelId
String

The model for text generation.

httpClient
HttpClient

The optional custom HttpClient.

serviceId
String

The optional service ID.

Returns

The updated kernel builder.

Applies to

AddOllamaChatCompletion(IKernelBuilder, String, Uri, String)

Add Ollama Chat Completion service to the kernel builder.

public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaChatCompletion(this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, Uri endpoint, string? serviceId = default);
static member AddOllamaChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * Uri * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaChatCompletion (builder As IKernelBuilder, modelId As String, endpoint As Uri, Optional serviceId As String = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The kernel builder.

modelId
String

The model for text generation.

endpoint
Uri

The endpoint to Ollama hosted service.

serviceId
String

The optional service ID.

Returns

The updated kernel builder.

Applies to