Table of Contents

Method GetEmbeddingsAsync

Namespace
LMKit.Integrations.Aws.Embeddings
Assembly
LM-Kit.NET.Integrations.Aws.dll

GetEmbeddingsAsync(IEnumerable<string>, CancellationToken)

Asynchronously generates embedding vectors for a batch of texts.

public override Task<float[][]> GetEmbeddingsAsync(IEnumerable<string> texts, CancellationToken cancellationToken = default)

Parameters

texts IEnumerable<string>

The texts to embed. Cannot be null or empty.

cancellationToken CancellationToken

Optional token to cancel the operation.

Returns

Task<float[][]>

A task whose result is an array of vectors, one per input text and in the same order.

Remarks

This is the single load-bearing operation of the contract. Remote providers should batch the request to amortize network cost; local providers may batch by token count.

Share