Class EmbedContentRequest
Generates an embedding from the model given an input Content.
Implements
Inherited Members
Namespace: Glitch9.AIDevKit.Google
Assembly: Glitch9.AIDevKit.Provider.Google.dll
Syntax
public class EmbedContentRequest : GoogleGeminiRequest, IJsonRequest
Properties
| Edit this page View SourceContent
Required. The content to embed. Only the parts.text fields will be counted.
Declaration
[JsonProperty("content")]
public GeminiContent Content { get; set; }
Property Value
| Type | Description |
|---|---|
| GeminiContent |
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
[JsonProperty("outputDimensionality")]
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
[JsonProperty("taskType")]
public EmbedTaskType? TaskType { get; set; }
Property Value
| Type | Description |
|---|---|
| EmbedTaskType? |
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
[JsonProperty("title")]
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |