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
valuesIEnumerable<string>The inputs.
optionsEmbeddingGenerationOptionsGeneration options, or null.
cancellationTokenCancellationTokenCancellation, 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.