Method GetEmbeddingsAsync
- Namespace
- LMKit.Integrations.ExtensionsAI.Embeddings
- Assembly
- LM-Kit.NET.Integrations.ExtensionsAI.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
textsIEnumerable<string>The texts to embed. Cannot be null or empty.
cancellationTokenCancellationTokenOptional 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.