Table of Contents

Method AddLMKitChatCompletion

Namespace
LMKit.Integrations.SemanticKernel
Assembly
LM-Kit.NET.Integrations.SemanticKernel.dll

AddLMKitChatCompletion(IKernelBuilder, LM, LMKitPromptExecutionSettings)

Adds the LMKit chat completion service to the kernel builder using the specified LM model. This method creates an instance of LMKitChatCompletion with the provided model and registers it.

public static void AddLMKitChatCompletion(this IKernelBuilder builder, LM model, LMKitPromptExecutionSettings defaultPromptExecutionSettings = null)

Parameters

builder IKernelBuilder

The kernel builder to which the chat completion service is added.

model LM

The LMKit model used for chat completion.

defaultPromptExecutionSettings LMKitPromptExecutionSettings

An optional instance of LMKitPromptExecutionSettings that provides default settings for text generation. If not provided, a new instance will be created using the specified model.

AddLMKitChatCompletion(IKernelBuilder, LMKitChatCompletion)

Adds the specified LMKit chat completion instance to the kernel builder. The instance is registered as a singleton service implementing Microsoft.SemanticKernel.ChatCompletion.IChatCompletionService.

public static void AddLMKitChatCompletion(this IKernelBuilder builder, LMKitChatCompletion chatCompletion)

Parameters

builder IKernelBuilder

The kernel builder to which the chat completion service is added.

chatCompletion LMKitChatCompletion

An instance of LMKitChatCompletion to register.