Class EmbedContentConfig.Builder
-
- All Implemented Interfaces:
public abstract class EmbedContentConfig.BuilderBuilder for EmbedContentConfig.
-
-
Constructor Summary
Constructors Constructor Description EmbedContentConfig.Builder()
-
Method Summary
Modifier and Type Method Description abstract EmbedContentConfig.BuilderhttpOptions(HttpOptions httpOptions)Setter for httpOptions. EmbedContentConfig.BuilderhttpOptions(HttpOptions.Builder httpOptionsBuilder)Setter for httpOptions builder. EmbedContentConfig.BuilderclearHttpOptions()Clears the value of httpOptions field. abstract EmbedContentConfig.BuildertaskType(String taskType)Setter for taskType. EmbedContentConfig.BuilderclearTaskType()Clears the value of taskType field. abstract EmbedContentConfig.Buildertitle(String title)Setter for title. EmbedContentConfig.BuilderclearTitle()Clears the value of title field. abstract EmbedContentConfig.BuilderoutputDimensionality(Integer outputDimensionality)Setter for outputDimensionality. EmbedContentConfig.BuilderclearOutputDimensionality()Clears the value of outputDimensionality field. abstract EmbedContentConfig.BuildermimeType(String mimeType)Setter for mimeType. EmbedContentConfig.BuilderclearMimeType()Clears the value of mimeType field. abstract EmbedContentConfig.BuilderautoTruncate(boolean autoTruncate)Setter for autoTruncate. EmbedContentConfig.BuilderclearAutoTruncate()Clears the value of autoTruncate field. abstract EmbedContentConfig.BuilderdocumentOcr(boolean documentOcr)Setter for documentOcr. EmbedContentConfig.BuilderclearDocumentOcr()Clears the value of documentOcr field. abstract EmbedContentConfig.BuilderaudioTrackExtraction(boolean audioTrackExtraction)Setter for audioTrackExtraction. EmbedContentConfig.BuilderclearAudioTrackExtraction()Clears the value of audioTrackExtraction field. abstract EmbedContentConfigbuild()-
-
Method Detail
-
httpOptions
abstract EmbedContentConfig.Builder httpOptions(HttpOptions httpOptions)
Setter for httpOptions.
httpOptions: Used to override HTTP request options.
-
httpOptions
@CanIgnoreReturnValue() EmbedContentConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
Setter for httpOptions builder.
httpOptions: Used to override HTTP request options.
-
clearHttpOptions
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearHttpOptions()
Clears the value of httpOptions field.
-
taskType
abstract EmbedContentConfig.Builder taskType(String taskType)
Setter for taskType.
taskType: Type of task for which the embedding will be used.
-
clearTaskType
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearTaskType()
Clears the value of taskType field.
-
title
abstract EmbedContentConfig.Builder title(String title)
Setter for title.
title: Title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`.
-
clearTitle
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearTitle()
Clears the value of title field.
-
outputDimensionality
abstract EmbedContentConfig.Builder outputDimensionality(Integer 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
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearOutputDimensionality()
Clears the value of outputDimensionality field.
-
mimeType
abstract EmbedContentConfig.Builder mimeType(String mimeType)
Setter for mimeType.
mimeType: Gemini Enterprise Agent Platform only. The MIME type of the input.
-
clearMimeType
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearMimeType()
Clears the value of mimeType field.
-
autoTruncate
abstract EmbedContentConfig.Builder autoTruncate(boolean 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
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearAutoTruncate()
Clears the value of autoTruncate field.
-
documentOcr
abstract EmbedContentConfig.Builder documentOcr(boolean 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
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearDocumentOcr()
Clears the value of documentOcr field.
-
audioTrackExtraction
abstract EmbedContentConfig.Builder audioTrackExtraction(boolean 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
@CanIgnoreReturnValue() EmbedContentConfig.Builder clearAudioTrackExtraction()
Clears the value of audioTrackExtraction field.
-
build
abstract EmbedContentConfig build()
-
-
-
-