Class: Turbopuffer::Models::NamespaceRecallResponse::GroundTruth

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/namespace_recall_response.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(nearest_neighbors: , query_vector: ) ⇒ Object

Parameters:

  • nearest_neighbors (Array<Turbopuffer::Models::Row>) (defaults to: )

    The true nearest neighbors with their distances and vectors.

  • query_vector (Array<Float>) (defaults to: )

    The query vector used for this search.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/turbopuffer/models/namespace_recall_response.rb', line 48

class GroundTruth < Turbopuffer::Internal::Type::BaseModel
  # @!attribute nearest_neighbors
  #   The true nearest neighbors with their distances and vectors.
  #
  #   @return [Array<Turbopuffer::Models::Row>]
  required :nearest_neighbors, -> { Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Row] }

  # @!attribute query_vector
  #   The query vector used for this search.
  #
  #   @return [Array<Float>]
  required :query_vector, Turbopuffer::Internal::Type::ArrayOf[Float]

  # @!method initialize(nearest_neighbors:, query_vector:)
  #   @param nearest_neighbors [Array<Turbopuffer::Models::Row>] The true nearest neighbors with their distances and vectors.
  #
  #   @param query_vector [Array<Float>] The query vector used for this search.
end

Instance Attribute Details

#nearest_neighborsArray<Turbopuffer::Models::Row>

The true nearest neighbors with their distances and vectors.

Returns:



53
# File 'lib/turbopuffer/models/namespace_recall_response.rb', line 53

required :nearest_neighbors, -> { Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Row] }

#query_vectorArray<Float>

The query vector used for this search.

Returns:

  • (Array<Float>)


59
# File 'lib/turbopuffer/models/namespace_recall_response.rb', line 59

required :query_vector, Turbopuffer::Internal::Type::ArrayOf[Float]