EmbedContentConfig

@Serializable
data class EmbedContentConfig(val taskType: String? = null, val title: String? = null, val outputDimensionality: Int? = null, val mimeType: String? = null, val autoTruncate: Boolean? = null, val documentOcr: Boolean? = null, val audioTrackExtraction: Boolean? = null, val httpOptions: HttpOptions? = null)

Optional parameters for the embed_content method.

Constructors

Link copied to clipboard
constructor(taskType: String? = null, title: String? = null, outputDimensionality: Int? = null, mimeType: String? = null, autoTruncate: Boolean? = null, documentOcr: Boolean? = null, audioTrackExtraction: Boolean? = null, httpOptions: HttpOptions? = null)

Properties

Link copied to clipboard

Gemini Enterprise Agent Platform only. Whether to extract audio from video content. Only applicable to Gemini Embedding 2 models.

Link copied to clipboard
val autoTruncate: Boolean? = null

Gemini Enterprise Agent Platform only. Whether to silently truncate inputs longer than the max sequence length. If this option is set to false, oversized inputs will lead to an INVALID_ARGUMENT error, similar to other text APIs.

Link copied to clipboard
val documentOcr: Boolean? = null

Gemini Enterprise Agent Platform only. Whether to enable OCR for document content. Only applicable to Gemini Embedding 2 models.

Link copied to clipboard

Used to override HTTP request options.

Link copied to clipboard
val mimeType: String? = null

Gemini Enterprise Agent Platform only. The MIME type of the input.

Link copied to clipboard

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 only. You cannot set this value if using the earlier model (models/embedding-001).

Link copied to clipboard
val taskType: String? = null

Type of task for which the embedding will be used.

Link copied to clipboard
val title: String? = null

Title for the text. Only applicable when TaskType is RETRIEVAL_DOCUMENT.