Class: Roseflow::Pinecone::VectorResponse

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

Direct Known Subclasses

VectorQueryResponse

Instance Attribute Summary collapse

Attributes inherited from BaseResponse

#body, #object, #status

Instance Method Summary collapse

Methods inherited from BaseResponse

#initialize

Constructor Details

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

Instance Attribute Details

#upsert_countObject (readonly)

Returns the value of attribute upsert_count.



49
50
51
# File 'lib/roseflow/pinecone/response.rb', line 49

def upsert_count
  @upsert_count
end

#vectorsObject (readonly)

Returns the value of attribute vectors.



49
50
51
# File 'lib/roseflow/pinecone/response.rb', line 49

def vectors
  @vectors
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/roseflow/pinecone/response.rb', line 63

def failure?
  !success?
end

#messageObject



55
56
57
# File 'lib/roseflow/pinecone/response.rb', line 55

def message
  @body.fetch("message")
end

#success?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/roseflow/pinecone/response.rb', line 59

def success?
  @response.success? && @status == 200
end