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
servicesIServiceCollectionThe service collection to register the chat client with.
modelLMThe LMKit model used for chat completions.
defaultOptionsChatOptionsOptional 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
servicesIServiceCollectionThe service collection to register the chat client with.
chatClientLMKitChatClientThe LMKitChatClient instance to register.
Returns
- IServiceCollection
The service collection for chaining.