EmbeddingModelEmbedContentAsync(IEnumerablePart, CancellationToken) Method
Embeds content based on a sequence of Part objects.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<EmbedContentResponse> EmbedContentAsync(
IEnumerable<Part> parts,
CancellationToken cancellationToken = default
)
- parts IEnumerablePart
- The sequence of Part objects to be used for embedding content.
- cancellationToken CancellationToken (Optional)
- A token for cancelling the operation, if needed.
TaskEmbedContentResponseReturns an instance of EmbedContentResponse containing the embeddings.