Class EmbedContentConfig.Builder
- Enclosing class:
- EmbedContentConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract EmbedContentConfig.BuilderaudioTrackExtraction(boolean audioTrackExtraction) Setter for audioTrackExtraction.abstract EmbedContentConfig.BuilderautoTruncate(boolean autoTruncate) Setter for autoTruncate.abstract EmbedContentConfigbuild()Clears the value of audioTrackExtraction field.Clears the value of autoTruncate field.Clears the value of documentOcr field.Clears the value of httpOptions field.Clears the value of mimeType field.Clears the value of outputDimensionality field.Clears the value of taskType field.Clears the value of title field.abstract EmbedContentConfig.BuilderdocumentOcr(boolean documentOcr) Setter for documentOcr.abstract EmbedContentConfig.BuilderhttpOptions(HttpOptions httpOptions) Setter for httpOptions.httpOptions(HttpOptions.Builder httpOptionsBuilder) Setter for httpOptions builder.abstract EmbedContentConfig.BuilderSetter for mimeType.abstract EmbedContentConfig.BuilderoutputDimensionality(Integer outputDimensionality) Setter for outputDimensionality.abstract EmbedContentConfig.BuilderSetter for taskType.abstract EmbedContentConfig.BuilderSetter for title.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
taskType
Setter for taskType.taskType: Type of task for which the embedding will be used.
-
clearTaskType
Clears the value of taskType field. -
title
Setter for title.title: Title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`.
-
clearTitle
Clears the value of title field. -
outputDimensionality
Setter for outputDimensionality.outputDimensionality: 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`).
-
clearOutputDimensionality
Clears the value of outputDimensionality field. -
mimeType
Setter for mimeType.mimeType: Gemini Enterprise Agent Platform only. The MIME type of the input.
-
clearMimeType
Clears the value of mimeType field. -
autoTruncate
Setter for autoTruncate.autoTruncate: 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.
-
clearAutoTruncate
Clears the value of autoTruncate field. -
documentOcr
Setter for documentOcr.documentOcr: Gemini Enterprise Agent Platform only. Whether to enable OCR for document content. Only applicable to Gemini Embedding 2 models.
-
clearDocumentOcr
Clears the value of documentOcr field. -
audioTrackExtraction
Setter for audioTrackExtraction.audioTrackExtraction: Gemini Enterprise Agent Platform only. Whether to extract audio from video content. Only applicable to Gemini Embedding 2 models.
-
clearAudioTrackExtraction
Clears the value of audioTrackExtraction field. -
httpOptions
Setter for httpOptions.httpOptions: Used to override HTTP request options.
-
httpOptions
@CanIgnoreReturnValue public EmbedContentConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder) Setter for httpOptions builder.httpOptions: Used to override HTTP request options.
-
clearHttpOptions
Clears the value of httpOptions field. -
build
-