Table of Contents

Constructor ExtensionsAIEmbedder

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

ExtensionsAIEmbedder(IEmbeddingGenerator<string, Embedding<float>>, string?, int)

Initializes a new instance of the ExtensionsAIEmbedder class.

public ExtensionsAIEmbedder(IEmbeddingGenerator<string, Embedding<float>> generator, string? modelId = null, int embeddingSize = 0)

Parameters

generator IEmbeddingGenerator<string, Embedding<float>>

The Microsoft.Extensions.AI embedding generator to wrap. Cannot be null.

modelId string

An optional identifier for the underlying model. When null, the generator's advertised default model id is used, falling back to a generic label.

embeddingSize int

The vector dimension, when known ahead of time. When 0, it is learned from the first successful embedding call.

Exceptions

ArgumentNullException

Thrown when generator is null.

Share