Class EmbedContentRequest
Generates an embedding from the model given an input Content.
public class EmbedContentRequest : GoogleGeminiRequest
- Inheritance
-
objectEmbedContentRequest
- Inherited Members
Properties
Content
Required. The content to embed. Only the parts.text fields will be counted.
public GeminiContent Content { get; set; }
Property Value
OutputDimensionality
Optional. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024, and the earlier model (models/embedding-001) cannot specify this value.
public int? OutputDimensionality { get; set; }
Property Value
- int?
TaskType
Optional. Optional task type for which the embeddings will be used. Can only be set for models/embedding-001.
public EmbedTaskType? TaskType { get; set; }
Property Value
Title
Optional. An optional title for the text. Only applicable when TaskType is RETRIEVAL_DOCUMENT. Note: Specifying a title for RETRIEVAL_DOCUMENT provides better quality embeddings for retrieval.
public string Title { get; set; }
Property Value
- string