Table of Contents

Method AddLMKitChatClient

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

AddLMKitChatClient(IServiceCollection, LM, ChatOptions?)

Adds an LMKit Microsoft.Extensions.AI.IChatClient implementation to the service collection using the specified model.

public static IServiceCollection AddLMKitChatClient(this IServiceCollection services, LM model, ChatOptions? defaultOptions = null)

Parameters

services IServiceCollection

The service collection to register the chat client with.

model LM

The LMKit model used for chat completions.

defaultOptions ChatOptions

Optional default chat options applied to every request unless overridden.

Returns

IServiceCollection

The service collection for chaining.

AddLMKitChatClient(IServiceCollection, LMKitChatClient)

Adds a pre-constructed LMKit Microsoft.Extensions.AI.IChatClient to the service collection.

public static IServiceCollection AddLMKitChatClient(this IServiceCollection services, LMKitChatClient chatClient)

Parameters

services IServiceCollection

The service collection to register the chat client with.

chatClient LMKitChatClient

The LMKitChatClient instance to register.

Returns

IServiceCollection

The service collection for chaining.