Table of Contents

Method GenerateAsync

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

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

Exactly one embedding per input, in input order. An empty sequence returns an empty collection without touching ORT.

public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)

Parameters

values IEnumerable<string>

The inputs.

options EmbeddingGenerationOptions

Generation options, or null.

cancellationToken CancellationToken

Cancellation, honoured BETWEEN batches. A single ORT Run is not interruptible.

Returns

Task<GeneratedEmbeddings<Embedding<float>>>

One embedding per input, plus the unpadded token count in Usage.