Class: Turbopuffer::Models::AttributeSchemaConfig::SparseKnn
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Turbopuffer::Models::AttributeSchemaConfig::SparseKnn
- Defined in:
- lib/turbopuffer/models/attribute_schema_config.rb
Overview
Instance Attribute Summary collapse
-
#distance_metric ⇒ Symbol, :dot_product
A function used to calculate sparse vector similarity.
Instance Method Summary collapse
-
#initialize(distance_metric: :dot_product) ⇒ Object
constructor
Whether to create a sparse kNN index for the attribute.
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(distance_metric: :dot_product) ⇒ Object
Whether to create a sparse kNN index for the attribute. Requires the ‘{}f16` type.
|
|
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 119
|
Instance Attribute Details
#distance_metric ⇒ Symbol, :dot_product
A function used to calculate sparse vector similarity.
117 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 117 required :distance_metric, const: :dot_product |