Class: Roseflow::Pinecone::VectorQueryResponse

Inherits:
VectorResponse show all
Defined in:
lib/roseflow/pinecone/response.rb

Instance Attribute Summary

Attributes inherited from VectorResponse

#upsert_count

Attributes inherited from BaseResponse

#body, #object, #status

Instance Method Summary collapse

Methods inherited from VectorResponse

#failure?, #message, #success?

Methods inherited from BaseResponse

#initialize, #success?

Constructor Details

This class inherits a constructor from Roseflow::Pinecone::BaseResponse

Instance Method Details

#vectorsObject



89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/roseflow/pinecone/response.rb', line 89

def vectors
  case @method_
  when :fetch
    @vectors.map do |vector|
      Vector::VectorObject.new(vector.last)
    end
  when :query
    @vectors.map do |vector|
      Vector::VectorObject.new(vector)
    end
  end
end