Class: Turbopuffer::Models::AttributeEmbedConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/attribute_embed_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(model:, attribute: nil, dims: nil) ⇒ Object

Some parameter documentations has been truncated, see Turbopuffer::Models::AttributeEmbedConfig for more details.

Configuration options for automatic embedding.

Parameters:

  • model (String)

    The model to use for embedding. See our documentation for a list of models suppo

  • attribute (String) (defaults to: nil)

    The name of an existing vector attribute to store embeddings in. If omitted, tur

  • dims (Integer) (defaults to: nil)

    The dimensionality to embed at. If not set, will pick the default for this model



# File 'lib/turbopuffer/models/attribute_embed_config.rb', line 30

Instance Attribute Details

#attributeString?

The name of an existing vector attribute to store embeddings in. If omitted, turbopuffer will generate a computed vector attribute named ‘$embed_<attribute>`.

Returns:

  • (String, nil)


19
# File 'lib/turbopuffer/models/attribute_embed_config.rb', line 19

optional :attribute, String

#dimsInteger?

The dimensionality to embed at. If not set, will pick the default for this model. If you’re storing embeddings in an existing attribute, this can be omitted, and may not be set to a value other than the dimensions of that attribute.

Returns:

  • (Integer, nil)


28
# File 'lib/turbopuffer/models/attribute_embed_config.rb', line 28

optional :dims, Integer

#modelString

The model to use for embedding. See our documentation for a list of models supported in each region.

Returns:

  • (String)


11
# File 'lib/turbopuffer/models/attribute_embed_config.rb', line 11

required :model, String