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
generatorIEmbeddingGenerator<string, Embedding<float>>The Microsoft.Extensions.AI embedding generator to wrap. Cannot be null.
modelIdstringAn optional identifier for the underlying model. When null, the generator's advertised default model id is used, falling back to a generic label.
embeddingSizeintThe vector dimension, when known ahead of time. When 0, it is learned from the first successful embedding call.
Exceptions
- ArgumentNullException
Thrown when
generatoris null.