EmbeddingModelEmbedContentAsync(Content, CancellationToken) Method
Embeds content based on a text input message.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<EmbedContentResponse> EmbedContentAsync(
Content content,
CancellationToken cancellationToken = default
)
- content Content
- The content 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.