Class EmbedContentRequest
Generates an embedding from the model given an input Content.
Inherited Members
Namespace: Glitch9.AIDevKit.Google
Assembly: .dll
Syntax
public class EmbedContentRequest : GenerativeAIRequest
Properties
Content
Required. The content to embed. Only the parts.text fields will be counted.
Declaration
public Content Content { get; set; }
Property Value
Type | Description |
---|---|
Content |
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.
Declaration
public int? OutputDimensionality { get; set; }
Property Value
Type | Description |
---|---|
int? |
TaskType
Optional. Optional task type for which the embeddings will be used. Can only be set for models/embedding-001.
Declaration
public TaskType? TaskType { get; set; }
Property Value
Type | Description |
---|---|
TaskType? |
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.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
string |