Skip to content

EmbedBatchAsync Method ​

Definition ​

  • Namespace: JASE.Embeddings
  • Assembly: JASE.Embeddings.dll

Task<IReadOnlyList<EmbeddingResult>> EmbedBatchAsync(IReadOnlyList<string> texts, EmbeddingRole role, CancellationToken cancellationToken = null) ​

csharp
Task<IReadOnlyList<EmbeddingResult>> EmbedBatchAsync(IReadOnlyList<string> texts, EmbeddingRole role, CancellationToken cancellationToken = null)

Embeds multiple text values with the same role.

Parameters ​

NameDescription
cancellationTokenA token used to cancel the operation.
roleThe role shared by all texts.
textsThe texts to embed.

Returns ​

One embedding result per input text, in the same order.