Class VertexAiMultimodalEmbeddingOptions

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

public class VertexAiMultimodalEmbeddingOptions extends Object implements org.springframework.ai.embedding.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, Ilayaperumal Gopinathan, Sebastien Deleuze
  • Field Details

    • DEFAULT_MODEL_NAME

      public static final String DEFAULT_MODEL_NAME
  • Constructor Details

    • VertexAiMultimodalEmbeddingOptions

      protected VertexAiMultimodalEmbeddingOptions(@Nullable String model, @Nullable Integer dimensions, @Nullable Integer videoStartOffsetSec, @Nullable Integer videoEndOffsetSec, @Nullable Integer videoIntervalSec)
  • Method Details

    • builder

    • getModel

      public String getModel()
      Specified by:
      getModel in interface org.springframework.ai.embedding.EmbeddingOptions
    • getDimensions

      public @Nullable Integer getDimensions()
      Specified by:
      getDimensions in interface org.springframework.ai.embedding.EmbeddingOptions
    • getVideoStartOffsetSec

      public @Nullable Integer getVideoStartOffsetSec()
    • getVideoEndOffsetSec

      public @Nullable Integer getVideoEndOffsetSec()
    • getVideoIntervalSec

      public @Nullable Integer getVideoIntervalSec()