WeaviateEx.API.Vectorizers.Multi2VecGoogle (WeaviateEx v0.7.4)

View Source

Multi2Vec-Google (Vertex AI) vectorizer configuration.

Uses Google's multimodal embedding models for image, text, and video.

Example

Multi2VecGoogle.new(
  project_id: "my-gcp-project",
  location: "us-central1",
  image_fields: [%{name: "image", weight: 0.5}],
  text_fields: [%{name: "description", weight: 0.5}]
)

Summary

Functions

Parse configuration from API response.

Create a new Multi2Vec-Google configuration.

Convert configuration to API format.

Returns the vectorizer name for the API.

Types

field_config()

@type field_config() :: %{:name => String.t(), optional(:weight) => float()}

t()

@type t() :: %WeaviateEx.API.Vectorizers.Multi2VecGoogle{
  dimensions: pos_integer() | nil,
  image_fields: [field_config()] | nil,
  location: String.t() | nil,
  model_id: String.t() | nil,
  project_id: String.t() | nil,
  text_fields: [field_config()] | nil,
  vectorize_collection_name: boolean(),
  video_fields: [field_config()] | nil
}

Functions

from_api(map)

@spec from_api(map()) :: t()

Parse configuration from API response.

new(opts \\ [])

@spec new(keyword()) :: t()

Create a new Multi2Vec-Google configuration.

Options

  • :project_id - Google Cloud project ID (required)
  • :location - Google Cloud location (e.g., "us-central1")
  • :model_id - Model ID (e.g., "multimodalembedding@001")
  • :dimensions - Output dimensions
  • :image_fields - List of image field configs with name and optional weight
  • :text_fields - List of text field configs with name and optional weight
  • :video_fields - List of video field configs with name and optional weight
  • :vectorize_collection_name - Include collection name (default: true)

Field Config

Fields can be specified as:

  • Simple strings: ["image", "caption"]
  • Maps with weights: [%{name: "image", weight: 0.7}]

to_api(config)

@spec to_api(t()) :: map()

Convert configuration to API format.

vectorizer_name()

@spec vectorizer_name() :: String.t()

Returns the vectorizer name for the API.