EmbeddingModelBatchEmbedContentAsync(IEnumerableEmbedContentRequest, CancellationToken) Method
Embeds a batch of content based on a collection of
Content objects.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<BatchEmbedContentsResponse> BatchEmbedContentAsync(
IEnumerable<EmbedContentRequest> requests,
CancellationToken cancellationToken = default
)
- requests IEnumerableEmbedContentRequest
- The collection of EmbedContentRequest requests to embed.
- cancellationToken CancellationToken (Optional)
- A token to monitor for cancellation requests.
TaskBatchEmbedContentsResponseA task representing the asynchronous operation, containing the batch embedding response.