EmbeddingModelEmbedContentAsync(EmbedContentRequest, CancellationToken) Method
Embeds content based on the provided text input message.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<EmbedContentResponse> EmbedContentAsync(
EmbedContentRequest request,
CancellationToken cancellationToken = default
)
- request EmbedContentRequest
- The request object to generate embeddings from.
- cancellationToken CancellationToken (Optional)
- A token to monitor for cancellation requests.
TaskEmbedContentResponseA task representing the asynchronous operation, containing the embedding response.