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

View Source

Ref2Vec-Centroid vectorizer configuration.

Calculates vectors based on the centroid of referenced objects' vectors. This is useful for creating aggregate vectors from cross-references.

Example

Ref2VecCentroid.new(
  reference_properties: ["hasArticles", "hasComments"],
  method: "mean"
)

Summary

Functions

Parse configuration from API response.

Create a new Ref2Vec-Centroid configuration.

Convert configuration to API format.

Returns the vectorizer name for the API.

Types

t()

@type t() :: %WeaviateEx.API.Vectorizers.Ref2VecCentroid{
  method: String.t() | nil,
  reference_properties: [String.t()] | nil
}

Functions

from_api(map)

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

Parse configuration from API response.

new(opts \\ [])

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

Create a new Ref2Vec-Centroid configuration.

Options

  • :reference_properties - List of cross-reference property names to include
  • :method - Centroid calculation method ("mean")

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.