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

View Source

Text2Vec-AWS vectorizer configuration.

Supports both AWS Bedrock and AWS SageMaker services for text embedding.

Services

  • :bedrock - Use AWS Bedrock models (e.g., Titan, Cohere)
  • :sagemaker - Use custom SageMaker endpoints

Bedrock Example

Text2VecAWS.new(
  service: :bedrock,
  model: "amazon.titan-embed-text-v1",
  region: "us-east-1"
)

SageMaker Example

Text2VecAWS.new(
  service: :sagemaker,
  endpoint: "my-endpoint",
  region: "us-west-2",
  target_model: "target",
  target_variant: "variant"
)

Summary

Functions

Parse configuration from API response.

Create a new Text2Vec-AWS configuration.

Convert configuration to API format.

Returns the vectorizer name for the API.

Types

service()

@type service() :: :bedrock | :sagemaker

t()

@type t() :: %WeaviateEx.API.Vectorizers.Text2VecAWS{
  endpoint: String.t() | nil,
  model: String.t() | nil,
  region: String.t() | nil,
  service: service(),
  target_model: String.t() | nil,
  target_variant: String.t() | 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-AWS configuration.

Options

Common

  • :service - Service type: :bedrock or :sagemaker (default: :bedrock)
  • :region - AWS region (required)
  • :vectorize_collection_name - Include collection name in vectorization (default: true)

Bedrock-specific

  • :model - Model ID (e.g., "amazon.titan-embed-text-v1")

SageMaker-specific

  • :endpoint - SageMaker endpoint name
  • :target_model - Target model for multi-model endpoints
  • :target_variant - Target variant for A/B testing

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.