Class VertexAiMultimodalEmbeddingOptions

java.lang.Object
org.springframework.ai.vertexai.embedding.multimodal.VertexAiMultimodalEmbeddingOptions
All Implemented Interfaces:
EmbeddingOptions, ModelOptions

public class VertexAiMultimodalEmbeddingOptions extends Object implements EmbeddingOptions
Class representing the options for Vertex AI Multimodal Embedding.

The options include the embedding model name, the number of dimensions of the resulting output, the start and end offset of the video segment, and the interval of the video for embedding generation.

The supported embedding models are text-embedding-004, text-multilingual-embedding-002, and multimodalembedding@001.

The number of dimensions is used to specify the size of the resulting output embeddings. This can be useful for storage optimization purposes. Supported for model version 004 and later.

The video start offset and end offset specify the segment of the video to be used for embedding generation. If not specified, the default values are calculated based on the video length and are adjusted to ensure a minimum segment of 120 seconds.

The video interval specifies the period of the video over which embeddings will be generated. The minimum value is 4, and if it is lower, an InvalidArgumentError is returned. There is no maximum limit for the interval value, but if it exceeds the video length or 120 seconds, it may impact the quality of the generated embeddings. The default value is 16.

Since:
1.0.0
Author:
Christian Tzolov
  • Field Details

    • DEFAULT_MODEL_NAME

      public static final String DEFAULT_MODEL_NAME
  • Constructor Details

    • VertexAiMultimodalEmbeddingOptions

      public VertexAiMultimodalEmbeddingOptions()
  • Method Details

    • builder

    • getModel

      public String getModel()
      Specified by:
      getModel in interface EmbeddingOptions
    • setModel

      public void setModel(String model)
    • getDimensions

      public Integer getDimensions()
      Specified by:
      getDimensions in interface EmbeddingOptions
    • setDimensions

      public void setDimensions(Integer dimensions)
    • getVideoStartOffsetSec

      public Integer getVideoStartOffsetSec()
    • setVideoStartOffsetSec

      public void setVideoStartOffsetSec(Integer videoStartOffsetSec)
    • getVideoEndOffsetSec

      public Integer getVideoEndOffsetSec()
    • setVideoEndOffsetSec

      public void setVideoEndOffsetSec(Integer videoEndOffsetSec)
    • getVideoIntervalSec

      public Integer getVideoIntervalSec()
    • setVideoIntervalSec

      public void setVideoIntervalSec(Integer videoIntervalSec)