BaseModelEmbedContentAsync Method

Embeds content using the specified Generative AI Model.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
protected virtual Task<EmbedContentResponse> EmbedContentAsync(
	string model,
	EmbedContentRequest request
)

Parameters

model  String
The name of the Generative AI Model to use for embedding the content. Format: "models/{model}".
request  EmbedContentRequest
The EmbedContentRequest containing the content and optional settings for embedding.

Return Value

TaskEmbedContentResponse
The EmbedContentResponse containing the generated text embedding vector.

See Also