Method AddLMKitTextGeneration
- Namespace
- LMKit.Integrations.SemanticKernel
- Assembly
- LM-Kit.NET.Integrations.SemanticKernel.dll
AddLMKitTextGeneration(IKernelBuilder, LM, LMKitPromptExecutionSettings)
Adds the LMKit text generation service to the kernel builder using the specified LM model. This method creates an instance of LMKitTextGeneration with the provided model and registers it.
public static void AddLMKitTextGeneration(this IKernelBuilder builder, LM model, LMKitPromptExecutionSettings defaultPromptExecutionSettings = null)
Parameters
builder
IKernelBuilderThe kernel builder to which the text generation service is added.
model
LMThe LMKit model used for text generation.
defaultPromptExecutionSettings
LMKitPromptExecutionSettingsAn optional instance of LMKitPromptExecutionSettings that provides default settings for text generation. If not provided, a new instance will be created using the specified model.
AddLMKitTextGeneration(IKernelBuilder, LMKitTextGeneration)
Adds the specified LMKit text generation instance to the kernel builder. The instance is registered as a singleton service implementing Microsoft.SemanticKernel.TextGeneration.ITextGenerationService.
public static void AddLMKitTextGeneration(this IKernelBuilder builder, LMKitTextGeneration textGeneration)
Parameters
builder
IKernelBuilderThe kernel builder to which the text generation service is added.
textGeneration
LMKitTextGenerationAn instance of LMKitTextGeneration to register.