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
builderEdgeBuilderThe Qavren.Edge builder.
configureAction<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
builderEdgeBuilderThe Qavren.Edge builder.
configureAction<OnnxEmbeddingOptions>Optional OnnxEmbeddingOptions configuration.
pipelineAction<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
builderEdgeBuilderThe Qavren.Edge builder.
namestringThe service key.
configureAction<OnnxEmbeddingOptions>Optional OnnxEmbeddingOptions configuration.
pipelineAction<EmbeddingGeneratorBuilder<string, Embedding<float>>>The optional MEAI pipeline.
Returns
- EdgeBuilder
The same builder.