Table of Contents

Class LMKitEmbeddingGenerator

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

Provides a text embedding generation service using LMKit's Embedder. This service implements the Microsoft.Extensions.AI.IEmbeddingGenerator<TInput, TEmbedding> interface to generate embeddings from text data for use with Microsoft.Extensions.AI consumers.

public sealed class LMKitEmbeddingGenerator : IEmbeddingGenerator<string, Embedding<float>>, IEmbeddingGenerator, IDisposable
Inheritance
LMKitEmbeddingGenerator
Implements
IEmbeddingGenerator<string, Embedding<float>>
IEmbeddingGenerator
Inherited Members

Constructors

LMKitEmbeddingGenerator(Embedder)

Initializes a new instance of the LMKitEmbeddingGenerator class with the provided embedder.

LMKitEmbeddingGenerator(LM)

Initializes a new instance of the LMKitEmbeddingGenerator class using the specified LMKit model. This constructor creates an internal Embedder instance based on the provided model.

Properties

Metadata

Methods

Dispose()
GenerateAsync(IEnumerable<string>, EmbeddingGenerationOptions?, CancellationToken)

Asynchronously generates embeddings for a collection of text inputs.

GetService(Type, object?)

Asks the Microsoft.Extensions.AI.IEmbeddingGenerator<TInput, TEmbedding> for an object of the specified type serviceType.