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

View Source

Text2Vec-VoyageAI vectorizer configuration.

Uses VoyageAI's embedding models for text vectorization.

Example

Text2VecVoyageAI.new(
  model: "voyage-large-2",
  truncate: true
)

Summary

Functions

Parse configuration from API response.

Create a new Text2Vec-VoyageAI configuration.

Convert configuration to API format.

Returns the vectorizer name for the API.

Types

t()

@type t() :: %WeaviateEx.API.Vectorizers.Text2VecVoyageAI{
  base_url: String.t() | nil,
  model: String.t() | nil,
  truncate: boolean() | nil,
  vectorize_collection_name: boolean()
}

Functions

from_api(map)

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

Parse configuration from API response.

new(opts \\ [])

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

Create a new Text2Vec-VoyageAI configuration.

Options

  • :model - VoyageAI model name (e.g., "voyage-large-2", "voyage-3")
  • :base_url - Custom API endpoint
  • :truncate - Whether to truncate long inputs
  • :vectorize_collection_name - Include collection name (default: true)

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.