Table of Contents

Method AddOnnxEmbeddings

Namespace
Qavren.Edge.Embeddings.Onnx
Assembly
Qavren.Edge.Embeddings.Onnx.dll

AddOnnxEmbeddings(EdgeBuilder, Action<OnnxEmbeddingOptions>?)

Calls AddOnnx + AddOnnxModel, then delegates to services.AddEmbeddingGenerator, which registers BOTH the closed generic and the non-generic forwarding descriptor. Hand-registering would satisfy only one and break half of MEVD and Semantic Kernel.

public static EdgeBuilder AddOnnxEmbeddings(this EdgeBuilder builder, Action<OnnxEmbeddingOptions>? configure = null)

Parameters

builder EdgeBuilder

The Qavren.Edge builder.

configure Action<OnnxEmbeddingOptions>

Optional OnnxEmbeddingOptions configuration.

Returns

EdgeBuilder

The same builder.

AddOnnxEmbeddings(EdgeBuilder, Action<OnnxEmbeddingOptions>?, Action<EmbeddingGeneratorBuilder<string, Embedding<float>>>)

Same, plus the MEAI pipeline for UseLogging / UseOpenTelemetry / UseDistributedCache. SP2 ships no middleware of its own; those three already exist upstream.

public static EdgeBuilder AddOnnxEmbeddings(this EdgeBuilder builder, Action<OnnxEmbeddingOptions>? configure, Action<EmbeddingGeneratorBuilder<string, Embedding<float>>> pipeline)

Parameters

builder EdgeBuilder

The Qavren.Edge builder.

configure Action<OnnxEmbeddingOptions>

Optional OnnxEmbeddingOptions configuration.

pipeline Action<EmbeddingGeneratorBuilder<string, Embedding<float>>>

The MEAI pipeline.

Returns

EdgeBuilder

The same builder.

AddOnnxEmbeddings(EdgeBuilder, string, Action<OnnxEmbeddingOptions>?, Action<EmbeddingGeneratorBuilder<string, Embedding<float>>>?)

Keyed registration, mirroring SP1's named-database convention.

public static EdgeBuilder AddOnnxEmbeddings(this EdgeBuilder builder, string name, Action<OnnxEmbeddingOptions>? configure = null, Action<EmbeddingGeneratorBuilder<string, Embedding<float>>>? pipeline = null)

Parameters

builder EdgeBuilder

The Qavren.Edge builder.

name string

The service key.

configure Action<OnnxEmbeddingOptions>

Optional OnnxEmbeddingOptions configuration.

pipeline Action<EmbeddingGeneratorBuilder<string, Embedding<float>>>

The optional MEAI pipeline.

Returns

EdgeBuilder

The same builder.